spamass-milt-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recipient address is alias


From: Cassandra Lynette Brockett
Subject: Re: recipient address is alias
Date: Tue, 3 Jun 2003 13:37:23 -0700

Hi there,

I wrote a modification to spamd to handle this exact situation.

It may not work on anything other than linux (it uses the praliases program
at the moment), but here's the code snippet to add in to spamd :-

--- Code snippet ---
        if (/^User: (.*)\r\n/)
        {
        $current_user = $1;
        auth_ident($current_user) if $opt{'auth-ident'};

## ---- Added by Cassandra ----
        my $USERALIAS = `praliases | grep ^$current_user: | cut -d ':' -f
2`;
        $USERALIAS =~ s/\n//g;
        $USERALIAS =~ s/\r//g;

        if ( (length $USERALIAS) ne 0 ) {
            logmsg "check: user '$current_user' is an alias for
'$USERALIAS' - updated.";
            $current_user = $USERALIAS;
            }
        undef $USERALIAS;
## ---- Added by Cassandra ----

        if (!$opt{'user-config'})
        {
          if ($opt{'sql-config'}) {
--- Code snippet ---

I have included additional code fragments so you can find the code to modify
in spamd... on my systems here spamd is a standard perl script, so it should
be the same for you - so you can directly modify the code yourself.

I am currently getting my head around *nix c coding (for file access), so it
will take me a little bit to get the correct spamass-milter update written
(no, I'm not currently a developer for the project, but I have too many
aliases for people here, and I needed that patch)....

I actually signed up to the list to find out if anyone had already written a
work-around for this - and during the evening I got this email - which tells
me that there isn't one yet...

Regards,
    Cassandra


----- Original Message ----- 
From: "Winfried Kaindl" <address@hidden>
To: <address@hidden>
Sent: Tuesday, June 03, 2003 6:41 AM
Subject: recipient address is alias


> I have a problem, if a mail is sent to an address which is an alias.
> Here, test is an alias for the existing user spamtest. The following
> error message occurs:
>
> Jun  3 13:38:01 orion sendmail[3385]: h53Bc1bP003385: Milter
> (spamassassin): init success to negotiate
> Jun  3 13:38:01 orion sendmail[3385]: h53Bc1bP003385: Milter: connect to
> filters
> Jun  3 13:38:02 orion sendmail[3385]: h53Bc1bP003385:
> from=<address@hidden>, size=845, class=0, nrcpts=1,
> msgid=<address@hidden>, proto=ESMTP,
> daemon=MTA, address@hidden
> [129.187.194.10]
> Jun  3 13:38:25 orion.tep.e-technik.tu-muenchen.de spamd[3223]:
> connection from localhost [127.0.0.1] at port 49257
> Jun  3 13:38:25 orion.tep.e-technik.tu-muenchen.de spamd[3390]:
> handle_user: unable to find user 'test'!
> Jun  3 13:38:25 orion.tep.e-technik.tu-muenchen.de spamd[3390]: Still
> running as root: user not specified with -u, not found, or set to root.
> Fall back to nobody.
> Jun  3 13:38:25 orion.tep.e-technik.tu-muenchen.de spamd[3390]: fatal:
> setuid to nobody failed
> Jun  3 13:38:26 orion sendmail[3385]: h53Bc1bP003385: Milter accept:
> message
> Jun  3 13:38:27 orion sendmail[3391]: h53Bc1bP003385: to=spamtest,
> delay=00:00:26, xdelay=00:00:01, mailer=local, pri=31188, dsn=2.0.0,
> stat=Sent
> Jun  3 13:38:27 orion sendmail[3391]: h53Bc1bP003385: done;
> delay=00:00:26, ntries=1
>
> And the mail is not scanned for spam!!
>
> I start spamass-milter0.1.3a and spamd-2.53 as follows:
> su spam -c '/usr/sbin/spamass-milter -p /var/spam/spamass.sock -f -u
> spam &'
> /usr/sbin/spamd -c -d
>
> Adding the '-u nonrootuser' option to spamd leads to non read/writeable
> .spamassassin
> files, which of course could be fixed by setting proper group
> permissions to all relevant home-directories. But I do not want to do
> this.
>
> Spamd dies at once if I add -u root (Bug??), with no valuable log (-D3):
> Jun  3 14:23:01 orion.tep.e-technik.tu-muenchen.de spamd[3465]: debug:
> daemonized.
>
> The problem is, that I want to run spamd as user root and every mail to
> an aliased address has to be scanned with spamd!
> Can anybody help me to fix this?
>
> Thanks is advance.
>
> Regards,
>
> Winfried
>
>
> _______________________________________________
> Spamass-milt-list mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/spamass-milt-list
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]