You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Dan Mahoney, System Admin" <da...@prime.gushi.org> on 2005/08/20 22:22:02 UTC
having spamc/spamd include hostname?
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.
-Dan
--
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
Re: having spamc/spamd include hostname?
Posted by "Dan Mahoney, System Admin" <da...@prime.gushi.org>.
On Sat, 20 Aug 2005, Eric A. Hall wrote:
>
> On 8/20/2005 4:22 PM, Dan Mahoney, System Admin wrote:
>
>> 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.
>
> A simple plug-in would probably do the trick. You'd need to call the
> Sys::Hostname::Long module yourself, since SA itself does not need or
> provide the local hostname itself.
SA provides the hostname of the checking machine in the headers, so it at
least uses them in some way.
I could probably hack this functionality into spamd -- spamc is the whore
as my knowledge of C is minimal at best, so it looks like I'd probably
have to go based on connecting ip, and from what I can see,
sys::hostname::long only checks the hostname of the machine it's running
on (equivalent to the hostname command).
-Dan
--
[23:49:00] LarpGM: Did my little TP comment scare you off?
[23:49:22] ilzarion: no, the shrieking retarded child eating people did
-Feb 06, 2001, times apparent.
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
Re: having spamc/spamd include hostname?
Posted by "Eric A. Hall" <eh...@ehsco.com>.
On 8/20/2005 4:22 PM, Dan Mahoney, System Admin wrote:
> 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.
A simple plug-in would probably do the trick. You'd need to call the
Sys::Hostname::Long module yourself, since SA itself does not need or
provide the local hostname itself.
--
Eric A. Hall http://www.ehsco.com/
Internet Core Protocols http://www.oreilly.com/catalog/coreprot/
Re: [sa-list] Re: having spamc/spamd include hostname?
Posted by "Dan Mahoney, System Admin" <da...@prime.gushi.org>.
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.
I'm thinking about hacking in a -h option to allow spamd to pass an
arbitrary @hostname segment.
Would help if I knew C. Either spamc needs the separate hostname option,
or spamd needs to know to look at where spamc is connecting from and use
that.
-Dan
> Regards,
>
> Rick
>
> PS. I'm Jibber on Undernet in #www if you need some direct help.
>
>
--
"Little tramp sits in her room all day, sewing dolls! Children
misbehaving in the basement, and one in the walls, doing his business God
knows where! You children will be the death of me, *sniff*."
'Mommy', The People Under The Stairs
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
Re: having spamc/spamd include hostname?
Posted by Rick Macdougall <ri...@nougen.com>.
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.
Regards,
Rick
PS. I'm Jibber on Undernet in #www if you need some direct help.