Virtual Users And Domains With Postfix, Courier And MySQL

Discussion in 'HOWTO-Related Questions' started by Radukn, Feb 24, 2007.

  1. Radukn

    Radukn New Member

    Sending email to other mailserver works ok!
    Send mail to my mailserver doesn't work (i think because i can't verify my mail)
    /var/log/mail.log :
    courierpop3login: scancur opendir("cur"): No such file or directory

    Regarding the sending of the email i get this piece of log:


    Feb 24 21:42:39 mail postfix/smtpd[1893]: connect from unknown[193.93.141.178]
    Feb 24 21:42:39 mail postfix/trivial-rewrite[1896]: warning: do not list domain indebara.ro in BOTH mydestination and virtual_mailbox_domains
    Feb 24 21:42:39 mail postfix/smtpd[1893]: 4397923F5C: client=unknown[193.93.141.178], sasl_method=LOGIN, [email protected]
    Feb 24 21:42:39 mail postfix/cleanup[1901]: 4397923F5C: message-id=<001d01c7585c$a6913c40$b28d5dc1@radukn>
    Feb 24 21:42:39 mail postfix/qmgr[1892]: 4397923F5C: from=<[email protected]>, size=648, nrcpt=1 (queue active)
    Feb 24 21:42:39 mail postfix/smtpd[1893]: disconnect from unknown[193.93.141.178]
    Feb 24 21:42:42 mail dccproc[1906]: socket(UDP): Address family not supported by protocol
    Feb 24 21:42:42 mail postfix/smtpd[1909]: connect from localhost[127.0.0.1]
    Feb 24 21:42:42 mail postfix/trivial-rewrite[1896]: warning: do not list domain indebara.ro in BOTH mydestination and virtual_mailbox_domains
    Feb 24 21:42:42 mail postfix/smtpd[1909]: 71D7323F5F: client=localhost[127.0.0.1]
    Feb 24 21:42:42 mail postfix/cleanup[1901]: 71D7323F5F: message-id=<001d01c7585c$a6913c40$b28d5dc1@radukn>
    Feb 24 21:42:42 mail postfix/qmgr[1892]: 71D7323F5F: from=<[email protected]>, size=1085, nrcpt=1 (queue active)
    Feb 24 21:42:42 mail postfix/trivial-rewrite[1896]: warning: do not list domain indebara.ro in BOTH mydestination and virtual_mailbox_domains
    Feb 24 21:42:42 mail amavis[1330]: (01330-03) Passed, <[email protected]> -> <[email protected]>, Message-ID: <001d01c7585c$a6913c40$b28d5dc1@radukn>, Hits: 0.687
    Feb 24 21:42:42 mail postfix/smtp[1902]: 4397923F5C: to=<[email protected]>, relay=127.0.0.1[127.0.0.1], delay=3, status=sent (250 2.6.0 Ok, id=01330-03, from MTA: 250 Ok: queued as 71D7323F5F)
    Feb 24 21:42:42 mail postfix/qmgr[1892]: 4397923F5C: removed
    Feb 24 21:42:42 mail postfix/smtpd[1909]: disconnect from localhost[127.0.0.1]
    Feb 24 21:42:42 mail postfix/smtp[1911]: 71D7323F5F: to=<[email protected]>, relay=none, delay=0, status=bounced (mail for mail.indebara.ro loops back to myself)
    Feb 24 21:42:42 mail postfix/cleanup[1901]: 8172723F60: message-id=<20070224214242.8172723F60@localhost>
    Feb 24 21:42:42 mail postfix/qmgr[1892]: 8172723F60: from=<>, size=2702, nrcpt=1 (queue active)
    Feb 24 21:42:42 mail postfix/qmgr[1892]: 71D7323F5F: removed
    Feb 24 21:42:42 mail postfix/smtp[1911]: 8172723F60: to=<[email protected]>, relay=none, delay=0, status=bounced (mail for mail.indebara.ro loops back to myself)
    Feb 24 21:42:42 mail postfix/qmgr[1892]: 8172723F60: removed



    Any ideeas??
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Take a look here: http://www.howtoforge.com/forums/showpost.php?p=42337&postcount=12

    Please add mail.indebara.ro to the mydestination line in /etc/postfix/main.cf and restart Postfix.
     
  3. Radukn

    Radukn New Member

    Still not working..

    I added mail.indeabra.ro in mydestination reloaded postfix but now i got this when trying to send an email to myself:
    Feb 27 11:03:46 mail postfix/smtpd[23187]: connect from unknown[193.93.141.178]
    Feb 27 11:03:46 mail postfix/smtpd[23187]: 5F1DB23F63: client=unknown[193.93.141.178], sasl_method=LOGIN, [email protected]
    Feb 27 11:03:46 mail postfix/cleanup[23195]: 5F1DB23F63: message-id=<000901c75a5e$ec722e00$b28d5dc1@radukn>
    Feb 27 11:03:46 mail postfix/qmgr[23154]: 5F1DB23F63: from=<[email protected]>, size=659, nrcpt=1 (queue active)
    Feb 27 11:03:46 mail postfix/smtpd[23187]: disconnect from unknown[193.93.141.178]
    Feb 27 11:03:46 mail amavis[1332]: (01332-03) lookup_sql: 2006, MySQL server has gone away
    Feb 27 11:03:46 mail amavis[1332]: (01332-03) NOTICE: Disconnected from SQL server
    Feb 27 11:03:46 mail amavis[1332]: (01332-03) TROUBLE in check_mail: creating_partsdir FAILED: DBD::mysql::st execute failed: MySQL server has g one away at (eval 38) line 238, <GEN17> line 175.
    Feb 27 11:03:46 mail amavis[1332]: (01332-03) PRESERVING EVIDENCE in /var/lib/amavis/amavis-20070224T205735-01332
    Feb 27 11:03:46 mail postfix/smtp[23196]: 5F1DB23F63: to=<[email protected]>, relay=127.0.0.1[127.0.0.1], delay=0, status=deferred (host 127.0. 0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=01332-03, creating_partsdir FAILED: DBD::mysql::st execute failed: MySQL server has gone away at (eval 38) line 238, <GEN17> line 175. (in reply to end of DATA command))
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Now there seems to be a problem with the MySQL server. What's the output of
    Code:
    netstat -tap
    ?
    Any MySQL errors in the logs?
     
  5. vlade

    vlade New Member

    Problem connecting to mail server

    This time I have problem connecting to mail server. I followed the tutorial for ubuntu 6.10. User is refused to connect. I added user using phpmyadmin. I use MS Outlook Express to test connection. But can not login - password problem.

    any idea ?

    Do I have to make some aditional editing the conf files if i use registered domain on my local network or do i just replace @example.tld to mydomain.com ?

    tnx
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's the exact error message? Any errors in your mail log?
     
  7. vlade

    vlade New Member

    Here is mail.log:

    Code:
    Apr  8 13:52:47 localhost pop3d-ssl: Connection, ip=[::ffff:192.168.1.1]
    Apr  8 13:52:47 localhost pop3d-ssl: LOGIN FAILED, [email protected], ip=[::ffff:192.168.1.1]
    Apr  8 13:52:52 localhost pop3d-ssl: Unexpected SSL connection shutdown.
    Apr  8 13:52:52 localhost pop3d-ssl: Disconnected, ip=[::ffff:192.168.1.1]
    Apr  8 13:52:57 localhost pop3d-ssl: Connection, ip=[::ffff:192.168.1.1]
    Apr  8 13:52:57 localhost pop3d-ssl: LOGIN FAILED, [email protected], ip=[::ffff:192.168.1.1]
    Apr  8 13:53:01 localhost pop3d-ssl: Unexpected SSL connection shutdown.
    Apr  8 13:55:23 localhost postfix/smtpd[4890]: connect from unknown[192.168.1.1]
    Apr  8 13:55:23 localhost postfix/trivial-rewrite[4893]: warning: do not list domain domainname.com in BOTH mydestination and virtual_mailbox_domains
    Apr  8 13:55:23 localhost postfix/smtpd[4890]: 294915F457: client=unknown[192.168.1.1]
    Apr  8 13:55:23 localhost postfix/cleanup[4894]: 294915F457: message-id=<001c01c77a07$1bfeed80$0501a8c0@dstroj>
    Apr  8 13:55:23 localhost postfix/qmgr[4710]: 294915F457: from=<[email protected]>, size=1311, nrcpt=1 (queue active)
    Apr  8 13:55:23 localhost postfix/smtpd[4890]: disconnect from unknown[192.168.1.1]
    Apr  8 13:55:27 localhost postfix/smtpd[4899]: connect from localhost[127.0.0.1]
    Apr  8 13:55:27 localhost postfix/trivial-rewrite[4893]: warning: do not list domain domainname.com in BOTH mydestination and virtual_mailbox_domains
    Apr  8 13:55:27 localhost postfix/smtpd[4899]: 8B6125F45E: client=localhost[127.0.0.1]
    Apr  8 13:55:27 localhost postfix/cleanup[4894]: 8B6125F45E: message-id=<001c01c77a07$1bfeed80$0501a8c0@dstroj>
    Apr  8 13:55:27 localhost postfix/qmgr[4710]: 8B6125F45E: from=<[email protected]>, size=1731, nrcpt=1 (queue active)
    Apr  8 13:55:27 localhost postfix/trivial-rewrite[4893]: warning: do not list domain domainname.com in BOTH mydestination and virtual_mailbox_domains
    Apr  8 13:55:27 localhost amavis[4559]: (04559-02) Passed CLEAN, LOCAL [192.168.1.1] [192.168.1.1] <[email protected]> -> <[email protected]>, Message-ID: <001c01c77a07$1bfeed80$0501a8c0@dstroj>, mail_id: 0l2oDFhAP-sJ, Hits: 1.945, queued_as: 8B6125F45E, 4412 ms
    Apr  8 13:55:27 localhost postfix/smtpd[4899]: disconnect from localhost[127.0.0.1]
    Apr  8 13:55:27 localhost postfix/smtp[4895]: 294915F457: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=4.6, delays=0.09/0.02/0.07/4.4, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=04559-02, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 8B6125F45E)
    Apr  8 13:55:27 localhost postfix/qmgr[4710]: 294915F457: removed
    Apr  8 13:55:27 localhost postfix/smtpd[4890]: connect from unknown[192.168.1.1]
    Apr  8 13:55:27 localhost postfix/smtp[4900]: warning: host mail.domainname.com[adslstaticip]:25 greeted me with my own hostname domainname.com
    Apr  8 13:55:27 localhost postfix/smtp[4900]: warning: host mail.domainname.com[adslstaticip]:25 replied to HELO/EHLO with my own hostname domainname.com
    Apr  8 13:55:27 localhost postfix/smtp[4900]: 8B6125F45E: to=<[email protected]>, relay=mail.domainname.com[adslstaticip]:25, delay=0.28, delays=0.09/0.06/0.13/0, dsn=5.4.6, status=bounced (mail for mail.domainname.com loops back to myself)
    Apr  8 13:55:27 localhost postfix/smtpd[4890]: disconnect from unknown[192.168.1.1]
    Apr  8 13:55:27 localhost postfix/cleanup[4894]: DFA1A5F45D: message-id=<[email protected]>
    Apr  8 13:55:27 localhost postfix/qmgr[4710]: DFA1A5F45D: from=<>, size=3456, nrcpt=1 (queue active)
    Apr  8 13:55:27 localhost postfix/trivial-rewrite[4893]: warning: do not list domain domainname.com in BOTH mydestination and virtual_mailbox_domains
    Apr  8 13:55:27 localhost postfix/bounce[4902]: 8B6125F45E: sender non-delivery notification: DFA1A5F45D
    Apr  8 13:55:27 localhost postfix/qmgr[4710]: 8B6125F45E: removed
    Apr  8 13:55:28 localhost postfix/smtpd[4890]: connect from unknown[192.168.1.1]
    Apr  8 13:55:28 localhost postfix/smtp[4900]: warning: host mail.domainname.com[adslstaticip]:25 greeted me with my own hostname domainname.com
    Apr  8 13:55:28 localhost postfix/smtp[4900]: warning: host mail.domainname.com[adslstaticip]:25 replied to HELO/EHLO with my own hostname domainname.com
    Apr  8 13:55:28 localhost postfix/smtp[4900]: DFA1A5F45D: to=<[email protected]>, relay=mail.domainname.com[adslstaticip]:25, delay=0.17, delays=0.03/0/0.13/0, dsn=5.4.6, status=bounced (mail for mail.domainname.com loops back to myself)
    Apr  8 13:55:28 localhost postfix/qmgr[4710]: DFA1A5F45D: removed
    Apr  8 13:55:28 localhost postfix/smtpd[4890]: disconnect from unknown[192.168.1.1]
    
    MSOE reports error with password and login window will not aoutomaticaly shut down until I press stop. Then in mail.log this reads as Unexpected SSL connection shutdown.

    I've hidden real domain and ip address.

    regards,
     
    Last edited: Apr 9, 2007
  8. falko

    falko Super Moderator Howtoforge Staff

     
  9. vlade

    vlade New Member

    I reinstalled everything from beginning, now i got this error:

    Code:
    $
    Apr 11 08:26:00 mala pop3d-ssl: Connection, ip=[::ffff:192.168.1.1]
    Apr 11 08:26:00 mala pop3d-ssl: chdir mydomain.com/myusername/: No such file or direc$
    Apr 11 08:26:17 mala pop3d-ssl: Connection, ip=[::ffff:192.168.1.1]
    Apr 11 08:26:17 mala pop3d-ssl: LOGIN FAILED, user=myusername, ip=[::ffff:192.168.1.$
    Apr 11 08:26:22 mala pop3d-ssl: Unexpected SSL connection shutdown.
    Apr 11 08:26:22 mala pop3d-ssl: Disconnected, ip=[::ffff:192.168.1.1]
    
    I've just no luck...

    added: Could this bee due to command dpkg-reconfigure postfix that i ran accidentally ?

    This thread got me thinking: http://www.howtoforge.com/forums/showthread.php?t=8061
    Got this one working with virtual accounts.

    How about non virtual ? is it possible to have both ?
    What is the difference. I suppose if one have real mail accounts, system usernames are in place or ?

    Another one: SSL is used only for POP3 or for SMTP also. Because smtp does not recognize password.

    tnx
     
    Last edited: Apr 11, 2007
  10. falko

    falko Super Moderator Howtoforge Staff

    You must send an email first to this account before you try to fetch emails. The necessary directories are created automatically when the first email arrives.

    Yes, but not on the same domain!

    Normally SSL isn't used for SMTP.
    What's the error message? Did you enable "Server requires authentication." in your email client?
     
  11. vlade

    vlade New Member

    Sending e-mails is working file. If I use Server requires authentication the i can not login and can not receive messages - bummer :|

    Now another question about relaying. It's not enough to put my isp's smtp server in main.cf! Some other configurations ?
     
  12. falko

    falko Super Moderator Howtoforge Staff

  13. dthacker

    dthacker New Member

    mail_admin_password in cleartext

    Thank you for a great How To. At the point I created my mail_admin user in the MySQL database I gave it a password of my own instead of "mail_admin_password".
    Should I change every occurrence of "mail_admin_password" in the /etc/postfix/mysql-virtual_* fileset to match? Is there a way to avoid having that password in cleartext? Did I miss something along the way?

    Dave
     
  14. vlade

    vlade New Member

    Yes you must change password to match.

    ---------
    Vlade
     
  15. angdo

    angdo New Member

    Please use [email protected] (full) in Outlook Express .../server/incoming mail server/ account name
     

Share This Page