Am Dienstag, 1. Mai 2007 schrieb Feris Thia:
I have a global (catch-all) account at my ISP. 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@abc.com) from RECEIVED field in mail's header and then resend it ?
Why procmail? You may better use fetchmail. This is partly supported by YaST. What's missing is the catch-all case (multi drop mailboxes). This must be configured manually in /etc/fetchmailrc. Look into the man page of fetchmail for details. Procmail is a mail delivery agent. Fetchmail is a mail retrieval agent. You can use Fetchmail to grab email from your ISP's POP3 or IMAP servers and deliver it to local users on your Linux system. This may be
On Tue, 1 May 2007 19:57:59 +0200 Herbert Graeber <lists@graeber-clan.de> wrote: preferable to the global account at your ISP, but that depends on many factors. With procmail you can use a number of rules to deliver email as you know. The problem is that there are a number of Received fields. One thing you could do is similar to the way we use Spamassasin, is to pipe the message through a program or script that you write, and add a unique field that you can key on. Here is my .procmailrc generic spamc rule. :0fw: spamassassin.lock * < 256000 | spamc So, you could use something like: :0fw:mycode.lock | mycode Mycode would then create a header line, such as "mycode: username" Then you would create a simple set of rules for the new header line you inserted. There may be a more elegant way of doing this, but it should work. -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9