On 1-May-2007, at 09:20, Feris Thia wrote:
Hi All,
I have a global (catch-all) account at my ISP.
Stop right there.
Procmail is not an MTA. It will never be an MTA. Down this path
lies only madness and The Dark Side.
In my Linux box I need to download all the emails from the account
and want to delivered it to local user's inbox. I've just learned
about .forward and .procmailrc and have no problem with Regular
Expression.
How do I match an email's address pattern (username(_at_)abc(_dot_)com) from
RECEIVED field in mail's header and then resend it ?
Received? You want to sort the mail into user's mailboxes based on
the FROM address?
Normally you would do something like this:
:0
* ^TO_bob(_at_)mydomain(_dot_)tld
! bob
:0
* ^TO_bill(_at_)mydomain(_dot_)tld
! bill
:0
* ^TO_babs(_at_)mydomain(_dot_)tld
! babs
:0
* ^TO_fred(_at_)mydomain(_dot_)tld
! fmurphy
# If we get here, it's not for us
:0
BAD_TO_ADDRESS
btu that is sorting based on the To: field.
However, this WILL cause problems you WILL lose mail it WILL be a
constant thorn in your side and you WILL get inundated with spam.
Catch-all addresses are a horrible hideous bad evil idea and should
be avoided at all costs.
--
I get the feeling that some people's idea of heaven is an "I told you
so" T-shirt - mmalc
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail