Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-11-2012, 10:07 PM   #1
Registered: Feb 2005
Location: Germany
Distribution: Aptosid
Posts: 148

Rep: Reputation: 19
getmail + procmail + exim4 = Local Duplicates & No Forwarding


In order to accumulate all my mail, process it by the same standards and make it available on one central IMAP server, I am currently trying to set up a chain of [several remote accounts] -> getmail -> procmail -> spamassassin -> clamav -> exim4 -> [central remote account].

The last time I did something like this is long past, so I am struggling quite a bit. Fortunately, only two problems remain.

* getmail fetches duplicates. It does not matter wether I set it up to use POP3 or IMAP on the same server, it always gets everything from all my accounts every time I run it.

There has been a bug in the past which produced the same behavior, but it had to do with a faulty implementation of IMAP and thus does not concern my setup.

The read_all flag for the respective accounts is set to 'false'.

The digests of known messages are built, and are readable by the program.

Here is a sample config file:

verbose = 1                                     
readall = false                                     
delete = 0                                      
message_log = /var/log/getmail.log             
timeout = 240                                   
max_message_size = 0

type = SimplePOP3Retriever
server = xxx
username = xxx
password = xxx

type = Filter_external
path = /usr/bin/spamc

type = Filter_classifier
path = /usr/bin/clamdscan
arguments = ("--stdout", "--no-summary", "-")
exitcodes_keep = (0, )

type = Filter_external
path = /usr/bin/formail
arguments = ("-R", "X-getmail-filter-classifier:", "X-ClamAV:")

type = MDA_external
path = /usr/bin/procmail
unixfrom = true
What is wrong with that setup?

* Also, I seem not to be able to forward my mail to the external address. It is located with a free web hosting provider (, whose SMTP server I tried beforehand. (Simple HELO; MAIL FROM <random address>; RCPT TO <remote account>; DATA [...] .; QUIT and a message apped in the inbox.) I set up exim4 to use that exact SMTP as a Smart Host, and as procmail directs mail to one of the addresses I tried, I assume that the procedure is about the same I tried. However, neither a message nor an error is ever received. What could be wrong here? My procmail recipe is as follows:


* X-ClamAV:.*FOUND

* X-Spam-Flag: YES
* ! ^X-Loop: pikaro
  | formail -A"X-Loop: pikaro"

* ! ^X-Spam-Flag: YES
* ! ^X-Loop: pikaro
  | formail -A"X-Loop: pikaro"
Any errors here?

Thanks for any advice! I'll be glad to provide any furthe information needed, of course.

Last edited by Vinter; 03-13-2012 at 11:33 AM.
Old 03-13-2012, 11:33 AM   #2
Registered: Feb 2005
Location: Germany
Distribution: Aptosid
Posts: 148

Original Poster
Rep: Reputation: 19

Problems solved. Just for reference, if anyone comes across the same issues:

GetMail config file style seems to have changed. I copied the base structure of what I posted above from someone else - and the section declaring options cannot be named "default" any more, it needs to be called "options". (Don't know if this was ever different, maybe I copied a mistake in the first place.)

Also, while exim4 asks for a FQDN, it does _not_ try to use it for HELO in SMTP (for whatever reason). I had to add a line (and I know it breaks some other usage profiles, but DAMN this config file is a mess!) saying REMOTE_SMTP_HELO_DATA=${qualify_domain} in line 1440 of /etc/exim4/exim4.conf.template.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chemistry problem: Identify duplicates and non-duplicates within TWO sdf files robertselwyne Programming 5 12-09-2011 07:20 AM
exim4 / portmap compromised. problem "solved" -> exim4 question & rkhunter log eichenhain Linux - Security 2 01-10-2011 12:00 PM
getmail, procmail and mutt in etch kel_en Debian 1 05-14-2006 07:37 AM
(xserver-xfree86 and xdm) (exim4, fetchmail, procmail & mutt) leamassiot Debian 5 12-18-2005 02:59 PM
procmail and forwarding samek Linux - Software 3 09-12-2005 09:18 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration