procmail
[Top] [All Lists]

Procmail, Exim4 & Virtual Users

2009-03-30 17:17:07
Hi,
I am using Exim4 on a Ubuntu 8.10 box. The mail users are virtual users on
the system, authenticating against MySQL. All mailboxes (maildir) are
stored in /home/vmail/$virtual_user/ and owned by mail:mail. Dovecot is
used for imap/pop access. A normal delivery in a mailbox is handled by the
following exim-router and -transport.

Router:
  virtual_local_mailbox:
  driver = accept
  domains = ${lookup mysql {MYSQL_Q_LOCAL}{$value}}
  transport = virtual_local_md_delivery

Transport:
  virtual_local_md_delivery:
  driver = appendfile
  directory = /home/vmail/${lookup mysql {MYSQL_Q_BOXNAME}{$value}}
  maildir_format
  user = mail
  group = mail
  mode = 0660
  directory_mode = 0770


On this mailserver there are two local users, for whom I want to enable
Procmail. These local users are virtual mail users as well. There is a
problem however with ownership of directories. If I let the mail go through
a procmail transport, I need to set the user and group to mail, to be able
to drop mail in the mailboxes. I thought of using the following exim-router
and -transport.

Router:
  procmail:
  debug_print = "R: procmail for $local_part(_at_)$domain"
  driver = accept
  domains = +local_domains
  check_local_user
  transport = procmail_pipe
  # emulate OR with "if exists"-expansion
  require_files = ${local_part}:\
                  ${if exists{/etc/procmailrc}\
                    {/etc/procmailrc}{${home}/.procmailrc}}:\
                  +/usr/bin/procmail
  no_verify
  no_expn

Transport:
  procmail_pipe:
  debug_print = "T: procmail_pipe for $local_part(_at_)$domain"
  driver = pipe
  path = "/bin:/usr/bin:/usr/local/bin"
  command = "/usr/bin/procmail"
  user = mail
  group = mail
  return_path_add
  delivery_date_add
  envelope_to_add


Since the mail is being delivered as mail, I guess procmail tries to read
the procmailrc in the home directories of these local users and an error
occurres.

R=procmail T=procmail_pipe defer (13): Permission denied: failed to/
chdir to /home/$local_user

How can I use procmail on a system where all mail is owned by one special
user (mail in my case)?
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Procmail, Exim4 & Virtual Users, wido <=