[SOLVED] Procmail
-
- Posts: 4
- Joined: Tue Jan 14, 2014 10:00 pm
[SOLVED] Procmail
How can I get Procmail working on Exim? I want to add a per-user procmailrc without breaking the way Exim works with Vesta.
Last edited by Jared Earle on Thu Apr 24, 2014 12:43 am, edited 1 time in total.
-
- Posts: 4
- Joined: Tue Jan 14, 2014 10:00 pm
Re: Procmail
Update: I hammered out a config that works.
Router:
Transport:
If you put a .procmailrc file in /home/$user/mail/$domain/$mailuser (i.e. /home/jared/mail/mydomain.com/jared/.procmailrc) then Exim will notice it and route the mail through proemial accordingly.
I hope this helps anyone else that was struggling.
Router:
Code: Select all
procmail:
driver = accept
transport = procmail
condition = ${if exists{${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/${domain}/${local_part}/.procmailrc}}{yes}{no}}
require_files = ${extract{5}{::}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/${domain}/${local_part}/.procmailrc
Code: Select all
procmail:
driver = pipe
command = "/usr/bin/procmail -m ${extract{5}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}/mail/${domain}/${local_part}/.procmailrc"
return_path_add
delivery_date_add
envelope_to_add
user = ${extract{2}{:}{${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/passwd}}}}
group = mail
initgroups
return_output
I hope this helps anyone else that was struggling.