Postfix Vacation forwarding

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Postfix Vacation forwarding

Ken Meyers
Hi all,
I'm a newbie to the mailing list and got excellent help on the first issue I had.  In this Case I am trying to set up vacation forwarding to work using horde/Ingo and Procmail with Postfix.  How do I set the system up to use procmail or is there a better answer?  Ingo is configured to create the .procmailrc file and that works but I think postfix is not set up correctly to use procmail.  I have included a copy of the main.cf, a part of the log file and a user account in LDAP.  Most of this configuration was inherited from a former employee.
Sorry for the long email.  
Thanks for the Help.
Ken

MAIN.CF file
readme_directory = /usr/share/doc/packages/postfix/README_FILES
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = mail1.ssacres.com
mydomain = ssacres.com
inet_interfaces = 127.0.0.1, 172.20.30.15
mydestination = $myhostname, localhost.$mydomain, mail3.$mydomain, phcorp.ssacres.com,

cssmail.ssacres.com
defer_transports =
mynetworks_style = subnet
relayhost = [address of Barracuda]
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
mailbox_transport =
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = reject_unknown_sender_domain, permit_mynetworks
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no


#------------------------------Postfix LDAP integration------------------
alias_maps = hash:/etc/aliases ldap:ldapaliastag
local_transport = local
local_recipient_maps = $alias_maps ldap:ldapuserstag unix:passwd.byname

ldapaliastag_server_host = localhost
ldapaliastag_search_base = ou=Groups,ou=omcorp,o=ssacres
ldapaliastag_query_filter = (mail=%s)
ldapaliastag_result_attribute = cn
ldapaliastag_timeout = 30
ldapaliastag_bind = no

ldapuserstag_server_host = localhost
ldapuserstag_search_base = ou=People,ou=omcorp,o=ssacres
ldapuserstag_query_filter = (uid=%s)
ldapuserstag_result_attribute = uid
ldapuserstag_timeout = 30
ldapuserstag_bind = no


virtual_transport = virtual
virtual_mailbox_base = /var/spool/mail
virtual_maps = hash:/etc/postfix/virtual ldap:ldapvalias
virtual_mailbox_maps = ldap:ldapvirtual
virtual_mailbox_domains = mydomain.com, anotherdomain.com, thirddomain.com,

fourthdomain.com, fifthdomain.com
virtual_mailbox_limit = 400000000
virtual_minimum_uid = 500
virtual_uid_maps = ldap:ldapuidtag
virtual_gid_maps = static:100

ldapvirtual_server_host = localhost
ldapvirtual_search_base = ou=People,ou=omcorp,o=ssacres
ldapvirtual_query_filter = (mail=%s)
ldapvirtual_result_attribute = uid
ldapvirtual_timeout = 30
ldapvirtual_bind = no

ldapvalias_server_host = localhost
ldapvalias_domain = ssacres.com
ldapvalias_search_base = ou=People,ou=omcorp,o=ssacres
ldapvalias_query_filter = (mailinglistname=%u)
ldapvalias_result_attribute = uid
ldapvalias_timeout = 30
ldapvalias_bind = no

ldapuidtag_server_host = localhost
ldapuidtag_search_base = ou=People,ou=omcorp,o=ssacres
ldapuidtag_query_filter = (mail=%s)
ldapuidtag_result_attribute = uidNumber
ldapuidtag_timeout = 30
ldapuidtag_bind = no


#------------------------------------------------------------------------
mailbox_size_limit = 400000000
message_size_limit = 400000000
mynetworks = 172.20.0.0/16
#------------------------------------------------------------------------
End of Main.cf

Small log file sample

Jun 13 15:24:24 Mail3 postfix/virtual[29223]: C080D8C05AC: to=<[hidden email]>, relay=virtual, delay=35, delays=35/0/0/0.29, dsn=2.0.0, status=sent (delivered to mailbox)

Jun 13 15:24:24 Mail3 postfix/virtual[29223]: C080D8C05AC: to=<[hidden email]>, relay=virtual, delay=36, delays=35/0/0/0.35, dsn=2.0.0, status=sent (delivered to mailbox)

LDAP sample
# rwoods, People, omcorp, ssacres
dn: cn=rwoods,ou=People,ou=omcorp,o=ssacres
uid: rwoods
cn: Randy  Woods
cn: rwoods
sn: Woods
objectClass: organizationalPerson
objectClass: posixAccount
objectClass: top
objectClass: person
objectClass: shadowAccount
objectClass: inetOrgPerson
objectClass: mailingListPerson
mail: rwoods@ssacres
mail: [hidden email]
shadowLastChange: 11166
shadowMax: 99999
shadowWarning: 7
shadowInactive: -1
shadowExpire: -1
shadowFlag: 134540388
gidNumber: 100
gecos: Randy  Woods
uidNumber: 804
givenName: Randy
loginShell: /bin/bash
homeDirectory: /home/rwoods
telephoneNumber: 88240000
seeAlso: uid=omwoodra,ou=SolarisPeople,ou=omcorp,o=ssacres
employeeNumber: omwoodra
userPassword:: e2NyeXB0fSQxJGZSdFFaVmZ5JE44QTZVbnZvNm5FRVAvZFhYbjJZaDE=
mailingListName: Q12OMAHA
mailingListName: css
mailingListName: nxusers
mailingListName: region2



_________________________
This email was transferred using an Office free edition
of AXIGEN Mail Server.

Reply | Threaded
Open this post in threaded view
|

Re: Postfix Vacation forwarding

mouss-2
Ken Meyers wrote:
> Hi all,
> I'm a newbie to the mailing list and got excellent help on the first issue I had.  In this Case I am trying to set up vacation forwarding to work using horde/Ingo and Procmail with Postfix.  How do I set the system up to use procmail or is there a better answer?  Ingo is configured to create the .procmailrc file and that works but I think postfix is not set up correctly to use procmail.  I have included a copy of the main.cf, a part of the log file and a user account in LDAP.  Most of this configuration was inherited from a former employee.
> Sorry for the long email.  
> Thanks for the Help.
> Ken
>
> MAIN.CF file
> [snip]

do not send snippets from main.cf. Send output of 'postconf -n' instead.

from your logs, the mail is delivered with "virtual". virtual does not
execute commands (be them procmail or other). to execute procmail
instead of virtual, setup virtual_transport. However, using procmail
with virtual users is not simple.

Also, without seeing how the vacation is implemented in .procmailrc, it
is not possible to know whether this implementation is safe (there are
way to many borked vacation implementations). so it is possible that the
whole approach is unsafe/inappropriate.