Hi there,

I'm using a virtual vacation script (version 3.2), which runs as a content 
filter for a while - but I have one makjor problem. It works fine as an 
auotreply script for users who are on vacation, but stops all other users from 
sending and receiving their mail.

After many hours troubleshooting, it appers that all mail for everyone, is out 
through the content filter, and disaapears if it belongs to a user not on 
vacation - my guess is that it is failing on reinjection.

If I comment out the content filter, normal mail resumes (but obviously 
autoreply's are disabled).

So I can do one or the other - trouble is I need both to work.

As the server is mainly used for autoreplies, there are only a handful of users 
that need to use it as a normal mail server. So the way I see it I have two 
options.

[Option 1 - probably the correct option] - get this setup working so it can 
handle both types of users (in the office and out of the office)

[Option 2 - bit of a hack] Completely bypass the content filter for certain 
email addresses, so they are not injected to the vacation script on the way in 
or out. For this option, Ive already tried transport table, and access table in 
postfix - access table looked promising, but didnt have any affect - mail still 
went into the vacation.pl scrtip via the content filter (as per the maillog)

Can anyone please help?

I've attached main.cf, master.cf and output of maillog when sending or receiving

Please help!

Many thanks
Mark
-------------------------

Here is my main.cf

-------------------

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = all
mydestination = $myhostname, localhost, localhost.localdomain, 
localhost.$myhostname
relayhost = cluster3out.eu.messagelabs.com
alias_maps = hash:/etc/postfix/aliases
debug_peer_list = 127.0.0.1
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.5.9/samples
readme_directory = /usr/share/doc/postfix-2.5.9/README_FILES
inet_protocols = all
myhostname = smtp.timeswift.com
myorigin = smtp.timeswift.com
mydomain = timeswift.com
mail_name = iRedMail
mail_version = 0.5.1
biff = no
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql_relay_domains.cf
mynetworks = 127.0.0.0/8, xxxxxxxxxxx, xxxxxxxxxx, xxxxxxxxxxx
mynetworks_style = subnet
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = no
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
delay_warning_time = 0h
policy_time_limit = 3600
maximal_queue_lifetime = 1d
bounce_queue_lifetime = 1d
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps 
$mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps 
$relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps 
$sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps 
$transport_maps $virtual_alias_domains $virtual_alias_maps 
$virtual_mailbox_domains $virtual_mailbox_maps
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, 
check_helo_access pcre:/etc/postfix/helo_access.pcre
queue_run_delay = 300s
minimal_backoff_time = 300s
maximal_backoff_time = 4000s
enable_original_recipient = no
disable_vrfy_command = yes
home_mailbox = Maildir/
allow_min_user = no
mailbox_size_limit = 15728640
message_size_limit = 15728640
virtual_mailbox_limit_override = yes
virtual_overquota_bounce = yes
virtual_mailbox_limit_message = Sorry, the user's maildir has overdrawn the 
disk quota, please notice the user and try again later.
virtual_minimum_uid = 504
virtual_uid_maps = static:504
virtual_gid_maps = static:504
virtual_mailbox_base = /var/vmail/vmail01
check_sender_access = hash:/etc/postfix/sender_access
# header_checks = pcre:/etc/postfix/header_checks.pcre
# transport_maps = proxy:mysql:/etc/postfix/mysql_transport_maps_user.cf, 
proxy:mysql:/etc/postfix/mysql_transport_maps_domain.cf
transport_maps = hash:/etc/postfix/transport
virtual_mailbox_domains = 
proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit_maps = 
proxy:mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_domain.cf, 
proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_user.cf
recipient_bcc_maps = 
proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_domain.cf, 
proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_user.cf
relay_recipient_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = no
smtpd_recipient_restrictions = reject_unknown_sender_domain, 
reject_unknown_recipient_domain, reject_non_fqdn_sender, 
reject_non_fqdn_recipient, reject_unlisted_recipient, permit_mynetworks, 
permit_sasl_authenticated, reject_unauth_destination, 
reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, 
check_policy_service inet:127.0.0.1:10031
smtpd_tls_security_level = may
smtpd_enforce_tls = no
smtpd_tls_loglevel = 0
smtpd_tls_key_file = /etc/pki/tls/private/iRedMail.key
smtpd_tls_cert_file = /etc/pki/tls/certs/iRedMail_CA.pem
tls_random_source = dev:/dev/urandom
tls_daemon_random_source = dev:/dev/urandom
#
# Uncomment the following line to enable policyd sender throttle.
#
#smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10032
mailbox_command = /usr/libexec/dovecot/deliver
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = dovecot-auth
content_filter = smtp-amavis:[127.0.0.1]:10024
autoresponder_destination_recipient_limit = 1

---------------------------
Here is my master.cf
--------------------------

=========================================================================
smtp      inet  n       -       n       -       -       smtpd
# -o content_filter=autoresponder:dummy
  -o content_filter=vacation:dummy
#pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
#smtpclean unix  -      -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
pickup    fifo  n       -       n       60      1       pickup
  -o content_filter=
submission inet n       -       n       -       -       smtpd
  -o smtpd_enforce_tls=yes
  -o smtpd_sasl_auth_enable=yes
  -o 
smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  -o content_filter=
smtps     inet  n       -       n       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o content_filter=
dovecot unix    -       n       n       -       -      pipe
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -d ${recipient} 
-f ${sender}
smtp-amavis unix -  -   -   -   2  smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
    -o max_use=20

127.0.0.1:10025 inet n  -   -   -   -  smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -o smtpd_delay_reject=no
    -o smtpd_client_restrictions=permit_mynetworks,reject
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks_style=host
    -o mynetworks=127.0.0.0/8
    -o strict_rfc821_envelopes=yes
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000
    -o smtpd_client_connection_count_limit=0
    -o smtpd_client_connection_rate_limit=0
    -o 
receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings

#
# VIRTUAL VACATION
#
vacation        unix    -       n       n       -       -       pipe
   flags=DRhu user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} 
-- ${recipient}


-----------------------
maillog snippet
--------------

Jan 12 23:07:05 smtp postfix/smtpd[17893]: > smtp.timeswift.com[127.0.0.1]: 250 
2.0.0 Ok: queued as A2B5BFDC26
Jan 12 23:07:05 smtp postfix/smtpd[17893]: watchdog_pat: 0x8946e58
Jan 12 23:07:05 smtp roundcube: [12-Jan-2011 23:07:05 +0000]: User 
m...@timeswift.com [90.195.137.12]; Message for <harrop_m...@hotmail.com>; 250: 
2.0.0 Ok: queued as A2B5BFDC26
Jan 12 23:07:05 smtp postfix/qmgr[17898]: A2B5BFDC26: 
from=<m...@timeswift.com>, size=531, nrcpt=1 (queue active)
Jan 12 23:07:05 smtp postfix/smtpd[17893]: smtp_get: EOF
Jan 12 23:07:05 smtp postfix/smtpd[17893]: match_hostname: smtp.timeswift.com 
~? 127.0.0.0/8
Jan 12 23:07:05 smtp postfix/smtpd[17893]: match_hostaddr: 127.0.0.1 ~? 
127.0.0.0/8
Jan 12 23:07:05 smtp postfix/smtpd[17893]: disconnect from 
smtp.timeswift.com[127.0.0.1]
Jan 12 23:07:05 smtp postfix/pipe[17899]: A2B5BFDC26: 
to=<harrop_m...@hotmail.com>, relay=vacation, delay=0.15, 
delays=0.05/0.02/0/0.08, dsn=2.0.0, status=sent (delivered via vacation service)
Jan 12 23:07:05 smtp postfix/qmgr[17898]: A2B5BFDC26: removed



Reply via email to