Patrick Marquetecken wrote:
Hi,
I'm a bit stuck with procmail, i have one email account and several mail aliasses at my ISP. I use fetchmail in a cron on user level to get my emails. I whan't now mails that are for a mail alias (other to address) deliverd to another local .maildir. The problem is that they are pickup by the fetchmail script of my main user. I don't know of it is possible with procmail to point to a different home/.maildir but even then the uid would be worng of that email. Whats the best way to deliver those emails?
The problem is more complex as it looks like, because one thing is mail header item "To:" (which always should stay in header) and another thing is header item "RCPT TO:" sended to MTA during mail transport (which is usually stored to item "Delivered-To:")
Non equal "To:" and "rcpt to:" are used e.g. in this ML - "To: [EMAIL PROTECTED]", "rcpt to: [EMAIL PROTECTED]".
Now it depends on ISP's MTA, what will happen next. i.e. if "rcpt to:" mail addres is stored to mail header or not. I have bad experience using procmail on ISP's side, because it must be used with "preline" (to prevent adding "Delivered-To:" item witch causes mail bounceing by your MTA) and therefore "original" address "RCPT TO:" is lost. (I don't remember it exactly, so may be wrong.)
But back to your problem ... open fetched mail in source view to check if u can find "original" address ... if yes, it's simple ... just write a rule for procmail based on the item u find, can look like this ...
:0 * ^some-item: [EMAIL PROTECTED] .path/to/users/maildir/
HTH noro
-- [email protected] mailing list
