Aaron, all,
Quoting "Aaron P. Martinez" <[EMAIL PROTECTED]>:
> Essentially all i want to happen is for amavisd-new or SA to add the
> person our users are sending mail to the whitelist automatically. I
> don't think we really care if it's using the "to" header or the "rcpt to".
I think there are two ways to achieve this, one being to hack the source of
amavisd around, adding the necessary coding. Alternatively you could do this
within your MTA...
I have never used Postfix, though with Exim this should be quite straightforward
to achieve using a combination of an 'unseen' router and a pipe transport acting
upon all outgoing mail.
A router matching all outgoing mail originating from your known local domains
would direct the outgoing email to both the destined recipient, as well as to a
script via the ('unseen') pipe transport - unseen just means that delivery
doesn't stop at this point, the message can be processed by other routers.
Routers
-------
# Direct all locally sourced email to the whitelist script
whitelist_recip:
driver = accept
transport = whitelist_transport
unseen
...
# Deliver mail normally via SMTP
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
...
Transports
----------
# Handle outgoing local mail and send it to the bash script
whitelist_transport:
driver = pipe
command = /usr/local/bin/whitelist_sender.sh
user = mail
...
I realise that this is very exim specific - as I said I've not had any
experience of using postfix, though I'm sure that there must be a way of
achieving the same results. If somebody with more experience could interpret
my ramblings into postfix lingo?
A bash script would then extract the to:/cc: fields from the outgoing mail,
storing these into a lookup table - though this would probably be easier with
if amavis were using an sql database. I'm not sure whether amavis can read
whitelists from external flat files - can somebody confirm this?
Of course, you'd have to account for the address having already been previously
whitelisted, and if so, not adding it a second time. This should be a
straightforward sql/file search operation.
You would probably also want to periodically 'purge' the whitelist, removing
addresses that have not been used in a while.
> Is there a known way to make this happen that i'm missing?
Not natively with the software you are using AFAIK. I can't see that SA will be
capable of doing this, and as I mentioned above, short of source-hacking, amavis
cannot achieve this.
> Is there a reason this is a bad idea?
If done correctly I believe that this will be quite effective and reliable, as
others have mentioned, this is used by a variety of providers - for example
Hotmail use a very similar system whereby you can add recipients to your
'contacts' list - which are then considered spam whitelisted.
Regards
Richard
--
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/