You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2005/08/26 18:35:21 UTC
Re: [sa-list] Re: having spamc/spamd include hostname?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dan Mahoney, System Admin writes:
> On Sat, 20 Aug 2005, Rick Macdougall wrote:
>
> > Dan Mahoney, System Admin wrote:
> >
> >> Hey all,
> >>
> >> I'd like to run one spamd box for many clients, using SQL user prefs. Is
> >> there a way to have spamd use different domain names -- or have spamc pass
> >> the `hostname' of the machine along?
> >>
> >> basically I will have a different sql userpref for jdoe@hosta.com or
> >> jdoe@hostb.com, or different global defaults for hosta.com. This seems
> >> elementary to do, but I can't figure out how to make spamd tell which one
> >> to use -- maybe based on the connecting ip, maybe based on a command
> >> line/config file variable passed.
> >>
> > Hi,
> >
> > How are you calling spamc ? All of our simscan (for qmail) servers call
> > spamc with the -u option, passing the full user@domain.com part. We do this
> > for about 500 different domains currently, all with their own preferences per
> > domain and per user.
>
> Right now spamc gets the username from $>, i.e. there is no -u specified.
>
> I made this post to comp.mail.misc
> http://groups.google.com/group/comp.mail.misc/browse_thread/thread/57a032d36d6d7142/b44ac792b3e77660#b44ac792b3e77660
>
> I made a similar post to the spamassassin users list.
> Neither got a single response.
That's a shame.
I'm sure I saw this answered recently -- must have been another thread.
Anyway, the upshot is, just fix your MTA to call spamc with the full email
address as -u , e.g. "-u jdoe@hosta.com".
If your MTA can't do this, but can pass the username and domain
separately, create a 1-line shell script that calls
exec spamc -u $username@$domain
instead.
- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Exmh CVS
iD8DBQFDD0TJMJF5cimLx9ARAuXwAKC5jgvZ9QdCHpK0Z+htPoGYBix5UACguz50
pMP/wh8CZTfGpncDZel6ZFY=
=uhme
-----END PGP SIGNATURE-----
Re: [sa-list] Re: having spamc/spamd include hostname?
Posted by "Dan Mahoney, System Admin" <da...@prime.gushi.org>.
On Fri, 26 Aug 2005, Justin Mason wrote:
>
> Dan Mahoney, System Admin writes:
>> On Sat, 20 Aug 2005, Rick Macdougall wrote:
>>
>>> Dan Mahoney, System Admin wrote:
>>>
>>>> Hey all,
>>>>
>>>> I'd like to run one spamd box for many clients, using SQL user prefs. Is
>>>> there a way to have spamd use different domain names -- or have spamc pass
>>>> the `hostname' of the machine along?
>>>>
>>>> basically I will have a different sql userpref for jdoe@hosta.com or
>>>> jdoe@hostb.com, or different global defaults for hosta.com. This seems
>>>> elementary to do, but I can't figure out how to make spamd tell which one
>>>> to use -- maybe based on the connecting ip, maybe based on a command
>>>> line/config file variable passed.
>>>>
>>> Hi,
>>>
>>> How are you calling spamc ? All of our simscan (for qmail) servers call
>>> spamc with the -u option, passing the full user@domain.com part. We do this
>>> for about 500 different domains currently, all with their own preferences per
>>> domain and per user.
>>
>> Right now spamc gets the username from $>, i.e. there is no -u specified.
>>
>> I made this post to comp.mail.misc
>> http://groups.google.com/group/comp.mail.misc/browse_thread/thread/57a032d36d6d7142/b44ac792b3e77660#b44ac792b3e77660
>>
>> I made a similar post to the spamassassin users list.
>> Neither got a single response.
>
> That's a shame.
> I'm sure I saw this answered recently -- must have been another thread.
>
> Anyway, the upshot is, just fix your MTA to call spamc with the full email
> address as -u , e.g. "-u jdoe@hosta.com".
That was part of the question: How do I get that -u value in procmail?
Supposedly LOGNAME is unaffected by the dropprivs option. Is it really
easiest to just call "spamc -u `id -n`\@`hostname` ? If so, could someone
tell me that that actually IS the correct format for a .procmailrc before
I go hosing mail on a production system?
Right now spamc is being called from procmail with dropprivs so gets its
username from the current effective UID, which eliminates passing anything
at all. What I was hoping for was a -h option in spamc so that one could
JUST specify the "host" portion, while username continues to be gotten in
this manner.
> If your MTA can't do this, but can pass the username and domain
> separately, create a 1-line shell script that calls
>
> exec spamc -u $username@$domain
>
> instead.
Why use -u at all? Why not just let spamd continue to automatically KNOW
by the calling UID for spamc. This opens up to the possibility of users
running spamc -u someotheruser.
--
"Tonite on reboot! People misspelling as many words with sexual
connotations as possible..."
-Keyo-Chan, February 10th 1999, Undernet #reboot
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------