LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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


Hi!

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:

Code:
[default]                                       
verbose = 1                                     
readall = false                                     
delete = 0                                      
message_log = /var/log/getmail.log             
timeout = 240                                   
max_message_size = 0

[retriever]
type = SimplePOP3Retriever
server = xxx
username = xxx
password = xxx

[filter-spam]
type = Filter_external
path = /usr/bin/spamc

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

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

[destination]
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 (x10hosting.com), 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:

Code:
DEFAULT=/var/mail/$LOGNAME
VERBOSE=no

:0
* X-ClamAV:.*FOUND
inbox-virus

:0
* X-Spam-Flag: YES
* ! ^X-Loop: pikaro
{
  :0fwh
  | formail -A"X-Loop: pikaro"
  :0c
  inbox-spam
  :0
  !spam@xxx
}

:0
* ! ^X-Spam-Flag: YES
* ! ^X-Loop: pikaro
{
  :0fwh
  | formail -A"X-Loop: pikaro"
  :0c
  inbox
  :0
  !root@xxx
}
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 10:33 AM.
 
Old 03-13-2012, 10:33 AM   #2
Vinter
Member
 
Registered: Feb 2005
Location: Germany
Distribution: Aptosid
Posts: 148

Original Poster
Rep: Reputation: 19
*facepalm*

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.
 
  


Reply



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 06:20 AM
exim4 / portmap compromised. problem "solved" -> exim4 question & rkhunter log eichenhain Linux - Security 2 01-10-2011 11:00 AM
getmail, procmail and mutt in etch kel_en Debian 1 05-14-2006 06:37 AM
(xserver-xfree86 and xdm) (exim4, fetchmail, procmail & mutt) leamassiot Debian 5 12-18-2005 01:59 PM
procmail and forwarding samek Linux - Software 3 09-12-2005 08:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:59 AM.

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