Virtual Vacation with Postfixadmin

Discussion in 'HOWTO-Related Questions' started by justix, Jan 8, 2007.

  1. justix

    justix New Member

    Hi,
    I am really new to this.
    But I finally managed to setup Postfix+MySQL+Doveot+Spamassassin+postfixadmin on Redhat.

    And I am stuck with virtual vacation setup for 3 weeks. I can't figure this out.
    Can someone help? I am getting an error. When I try to send email to user who enabled vacation, the sender doesn't get the autoreply message (he is supposed to get it) and the recipient user mailbox is getting 3 same messages that sender has originally sent.

    Please help.

    My master.cf looks like this:
    Code:
    smtp      inet  n       -       n       -       -       smtpd
       -o content_filter=spamassassin
    
    #SpamAssassin
    spamassassin unix -   n   n   -   -   pipe
       user=nobody argv=/usr/bin/spamc -f -e
       /usr/sbin/sendmail.postfix -oi -f ${sender} ${recipient}
    #Vacation / Autoreply
    vacation  unix   -   n   n   -   -   pipe
      flags=DRhu user=vacation:vacation argv=/usr/bin/perl argv=/var/spool/vacation/vacation.pl
    
    And My main.cf looks like this :

    Code:
    broken_sasl_auth_clients = yes
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain = $myhostname
    smtpd_sasl_security_options = noanonymous
    smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
    smtpd_sender_restrictions = permit_sasl_authenticated
    
    virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
    virtual_mailbox_base = /usr/local/virtual
    virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
    virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
    virtual_uid_maps = static:89
    virtual_gid_maps = static:89
    virtual_transport = virtual
    virtual_minimum_uid = 89
    virtual_mailbox_limit = 100000000
    transport_maps =
       hash:/etc/postfix/transport
       mysql:/etc/postfix/mysql_virtual_transport_maps.cf
    vacation_destination_recipient_limit = 1
    
    local_recipient_maps = proxy:unix:passwd.byname $alias_maps
    mynetworks = 127.0.0.0/8
    allow_percent_hack = yes
    mailbox_command = /usr/bin/procmail
    local_header_rewrite_clients = static:all
    smtpd_client_recipient_rate_limit = 10
    smtpd_recipient_limit = 100 
     
  2. justix

    justix New Member

    Does someone has similar or same setting as mine?
    There is a perl script provided by postfixadmin. (vacation.pl)
    And I have read some posts on different forum saying that this vacation.pl script has some bug. Can someone tell me how to fix it, if there exist one?

    Thank you in advance!
     
  3. falko

    falko Super Moderator ISPConfig Developer

    Are there any errors in your mail log?
     
  4. justix

    justix New Member

    Hi,

    Yes there is an error saying that I can't connect to autoreply.testdomain.com
    I specified autoreply.testdomain.com in the postfixadmin config file.
    My var/log/maillog shows as follows:

    Code:
    Jan  8 16:05:55 mail6 postfix/smtp[25727]: connect to autoreply.testdomain.com[10.0.0.1]: Connection refused (port 25)
    Jan  8 16:05:56 mail6 postfix/smtp[25727]: BB91C38300A2: to=<[email protected]@autoreply.testdomain.com>, relay=none, delay=1, status=deferred (connect to autoreply.testdomain.com[10.0.0.1]: Connection refused)
    Jan  8 16:05:56 mail6 postfix/smtp[25727]: BB91C38300A2: to=<[email protected]@autoreply.testdomain.com>, orig_to=<[email protected]>, relay=none, delay=1, status=deferred (connect to autoreply.testdomain.com[10.0.0.1]: Connection refused)
    Jan  8 16:05:56 mail6 postfix/smtp[25727]: BB91C38300A2: to=<[email protected]@autoreply.testdomain.com>, orig_to=<[email protected]>, relay=none, delay=1, status=deferred (connect to autoreply.testdomain.com[10.0.0.1]: Connection refused)
    Jan  8 16:07:10 mail6 postfix/pipe[25550]: 7B80538300A7: to=<[email protected]@autoreply.testdomain.com>, orig_to=<[email protected]>, relay=spamassassin, delay=5, status=sent (mail6.testdomain.com)
    Jan  8 16:07:10 mail6 postfix/smtp[25727]: connect to autoreply.testdomain.com[10.0.0.1]: Connection refused (port 25)

    But If I try to modify my master.cf like this:


    Code:
    smtp      inet  n       -       n       -       -       smtpd
    #	-o content_filter=spamassassin
    	-o content_filter=vacation:dummy 

    Code:
    #SpamAssassin
    spamassassin unix -	n	n	-	-	pipe
    	user=nobody argv=/usr/bin/spamc -f -e
    	/usr/sbin/sendmail.postfix -oi -f ${sender} ${recipient}
    #Vacation / Autoreply
    vacation  unix   -   n   n   -   -   pipe
        flags=Rq user=vacation argv=/var/spool/vacation/vacation32.pl -f ${sender} -- ${recipient}
    #  flags=DRhu user=vacation:vacation argv=/usr/bin/perl argv=/var/spool/vacation/vacation.pl 
    

    Basically, I commented out spamassassin content_filter and put vacation:dummy then vacation works partially. It sends out the autoreply message to the sender but only once. If the same sender tries to send another email then the mail disappears. It does not get delivered to the destined mailbox. And when I put spamassassin and vacation in content_filter at the same time, both of them do not work. I just don't know how to put it together. Is there any way to keep spamassassin in the content_filter (since it is working) and just add another filter that sends out autoreply messages?


    Thank you for your time and help.
    I really appreciate.:)
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Is 10.0.0.1 your server's IP address? Is port 25 open on that system?

    I think the autoresponder caches the email addresses to which it has already sent a message so that it doesn't send the same message twice or more to the same email address.
     
  6. enigmaloops

    enigmaloops New Member

    something new - Wrong recipient from Vacation / Postfix

    i've searched and found something new: my vacation appears to "work" in that it replies to an outside sender to our system.

    two problems appear though: if an outside user sends an email to a user, and "cc:'s" the actual vacationing user, the original sender gets a vacation reply from the "to:" address instead of the vacationing "cc:" (correct) address.

    example: i send a test email from my yahoo account to: [email protected], and cc: [email protected] ... the auto reply comes back to my yahoo account from the to: [email protected] instead of the actual [email protected] ...

    i've looked everywhere and haven't seen this particular problem surface, yet, and i've re-installed, re-setup and still same thing.

    second problem... if i send an email to a vacationing internal user using our internal email server, i don't get an auto reply, only if i send an email from external address, i.e. yahoo, hotmail, etc.

    i've setup vacation exactly as the install txt explains, and it does send replies... just a bit incorrectly.

    any information would be greatly appreciated.

    shane
     

Share This Page