Postfix virtual users

Discussion in 'HOWTO-Related Questions' started by jacknetgb, Feb 8, 2008.

  1. jacknetgb

    jacknetgb New Member

    Ive followed the tutorial on here but mail doesnt get delievered properly, nor can i connect to the server with my email client?

    How can i diagnose the problem to help you guys assist me?

    Thanks,
    Jack
     
  2. thecaoticone

    thecaoticone New Member

    The fisrt place to look is in your mail log.

    /var/log/mail.log


    It should list errors there to give you idea of where to start.
     
  3. jacknetgb

    jacknetgb New Member

    Right ive attached part of mail.log because the error just seems to repeat. i can see that it cant lookup a table but i dont know where to start or what to check on that.
    Code:
    Feb  8 21:20:55 pandora postfix/smtpd[26403]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/smtpd[28004]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/smtpd[28232]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/smtpd[29111]: warning: problem talking to service rewrite: Connection reset by peer
    Feb  8 21:20:55 pandora postfix/master[26284]: warning: process /usr/lib/postfix/trivial-rewrite pid 31148 exit status 1
    Feb  8 21:20:55 pandora postfix/smtpd[27430]: warning: problem talking to service rewrite: Connection reset by peer
    Feb  8 21:20:55 pandora postfix/master[26284]: warning: process /usr/lib/postfix/trivial-rewrite pid 31152 exit status 1
    Feb  8 21:20:55 pandora postfix/smtpd[26433]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/smtpd[28231]: warning: problem talking to service rewrite: Connection reset by peer
    Feb  8 21:20:55 pandora postfix/master[26284]: warning: process /usr/lib/postfix/trivial-rewrite pid 31151 exit status 1
    Feb  8 21:20:55 pandora postfix/smtpd[29959]: warning: problem talking to service rewrite: Connection reset by peer
    Feb  8 21:20:55 pandora postfix/master[26284]: warning: process /usr/lib/postfix/trivial-rewrite pid 31150 exit status 1
    Feb  8 21:20:55 pandora postfix/smtpd[28998]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/smtpd[29110]: warning: problem talking to service rewrite: Connection reset by peer
    Feb  8 21:20:55 pandora postfix/master[26284]: warning: process /usr/lib/postfix/trivial-rewrite pid 31154 exit status 1
    Feb  8 21:20:55 pandora postfix/smtpd[27191]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/smtpd[26975]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/smtpd[26770]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/smtpd[29512]: warning: problem talking to service rewrite: Connection reset by peer
    Feb  8 21:20:55 pandora postfix/master[26284]: warning: process /usr/lib/postfix/trivial-rewrite pid 31153 exit status 1
    Feb  8 21:20:55 pandora postfix/smtpd[27394]: warning: problem talking to service rewrite: Success
    Feb  8 21:20:55 pandora postfix/master[26284]: warning: process /usr/lib/postfix/trivial-rewrite pid 31155 exit status 1
    Feb  8 21:20:57 pandora postfix/smtpd[31156]: connect from bay0-omc3-s28.bay0.hotmail.com[65.54.246.228]
    Thanks for all your help
    Jack
     
  4. thecaoticone

    thecaoticone New Member

    Check your "/etc/postfix/mysql-virtual_*.cf" files and double check that the "mail_admin" & "mail_admin_password" are identical in all of them.

    the files can be found here:
    http://www.howtoforge.com/virtual-users-and-domains-with-postfix-ubuntu-7.10-p2

    The "mail_admin" & "mail_admin_password" should also be the exact same in these files:
    /etc/pam.d/smtp
    /etc/postfix/sasl/smtpd.conf
    /etc/courier/authmysqlrc

    make sure there are no blank spaces after them ( except for /etc/pam.d/smtp ) and upper and lower cases, numbers, hyphens, etc. match exactly.

    any small typo will cause the system problems.
     
  5. jacknetgb

    jacknetgb New Member

    Right, i can now access my mailbox and everything after manually recreating the mail_admin account using phpmyadmin. But i cant send mail outbound nor recieve email inbound it seems when i do i get
    Code:
    Feb  9 11:13:18 pandora amavis[22205]: (!) DENIED ACCESS from IP 192.168.2.34, policy bank ''
    
    Any ideas on how to solve this?

    Thanks
    Jack
     
  6. thecaoticone

    thecaoticone New Member

    It looks like ip 192.168.2.34 is trying to connect amavis and it should be
    127.0.0.1


    Check /etc/hosts and make sure the following line exist at the top of the file:

    127.0.0.1 localhost.localdomain localhost


    Also check you /etc/postfix/main.cf for the following:

    myhostname = server1.example.com
    mydestination = server1.example.com, localhost, localhost.localdomain
    mynetworks = 127.0.0.0/8
     
  7. jacknetgb

    jacknetgb New Member

    Hmmm, well all they seem to be set correctly, anything else i should check?
     
  8. thecaoticone

    thecaoticone New Member

    I still believe the problem exist between postfix and amavis. I feel that it has to be something in one of those configurations that is causing the problem.

    The only files that should be involved are the config files for these 2 programs.

    Here is how my mail.log looks after a message is received.
    Notice how Postfix is running as localhost.localdomain[127.0.0.1] when connecting to Amavis.

    Code:
    Feb  9 06:17:06 server postfix/smtpd[17165]: connect from localhost.localdomain[127.0.0.1]
    Feb  9 06:17:06 server postfix/smtpd[17165]: E143BD98DF: client=localhost.localdomain[127.0.0.1]
    Feb  9 06:17:06 server postfix/cleanup[17156]: E143BD98DF: message-id=<200802091143.d89b0f463891@www.somewhere.com>
    Feb  9 06:17:07 server amavis[16128]: (16128-05) Passed CLEAN, [xxx.xxx.xxx.xxx] [xxx.xxx.xxx.xxx.] <user@www.somwhere.com> -> <user@mydomain.com>, Message-ID: <200802091143.d89b0f463891@www.somewhere.com>, mail_id: XRZQfIdeIda7, Hits: 0., queued_as: E143BD98DF, 16614 ms
    Feb  9 06:17:07 server postfix/smtpd[17165]: disconnect from localhost.localdomain[127.0.0.1]
    Feb  9 06:17:07 server postfix/qmgr[16643]: E143BD98DF: from=<user@swww.somehere.com>, size=2824, nrcpt=1 (queue active)
    Feb  9 06:17:07 server postfix/smtp[17157]: 2D10DD98DD: to=<user@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=20, delays=3.3/0.01/0.01/17, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=16128-05, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as E143BD98DF)
    Feb  9 06:17:07 server postfix/qmgr[16643]: 2D10DD98DD: removed
    Feb  9 06:17:07 server postfix/virtual[17168]: E143BD98DF: to=<user@mydomian.com>, relay=virtual, delay=0.13, delays=0.1/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)
    Feb  9 06:17:07 server postfix/qmgr[16643]: E143BD98DF: removed
    
    
    The only other thing I can think of is to send you private message where you can compare my configs to yours. I run the same system for email.
     
    Last edited: Feb 10, 2008

Share This Page