Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Joomla and php mail with nginx, postfix and dovecot

  1. #1
    Join Date
    Nov 2009
    Beans
    9

    Unhappy Joomla and php mail with nginx, postfix and dovecot

    I am running a VPS with ubuntu 12.04 , Nginx, mysql, php which I set up using this guide .
    I run multiple domains on it without any issue. Most domains contain a Joomla 2.5 installation which works fine with a small exception.
    No matter what I do, I cannot send mails. I have configured Joomla to use the php mail function, however somewhere along the way, the message get lost.
    Here is a syslog extract from the moment I clicked submit in the mail form. I have edited the emails for privacy's sake.


    Code:
    Jun  6 11:14:01 server1 CRON[23772]: (root) CMD (/usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
    Jun  6 11:14:02 server1 pure-ftpd: (?@::1) [INFO] New connection from ::1
    Jun  6 11:14:02 server1 pure-ftpd: (?@::1) [INFO] Logout.
    Jun  6 11:14:02 server1 postfix/smtpd[22409]: warning: hostname localhost does not resolve to address ::1: No address associated with hostname
    Jun  6 11:14:02 server1 postfix/smtpd[22409]: connect from unknown[::1]
    Jun  6 11:14:02 server1 postfix/anvil[1950]: statistics: max connection rate 2/60s for (smtp:::1) at Jun  6 11:05:01
    Jun  6 11:14:02 server1 postfix/anvil[1950]: statistics: max connection count 1 for (smtp:::1) at Jun  6 11:05:01
    Jun  6 11:14:02 server1 postfix/anvil[1950]: statistics: max cache size 1 at Jun  6 11:05:01
    Jun  6 11:14:02 server1 postfix/smtpd[22409]: lost connection after CONNECT from unknown[::1]
    Jun  6 11:14:02 server1 postfix/smtpd[22409]: disconnect from unknown[::1]
    Jun  6 11:14:02 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=::1, lip=::1, secured
    Jun  6 11:14:02 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=::1, lip=::1, secured
    Jun  6 11:14:42 server1 postfix/pickup[23607]: 0EA1DCF01862: uid=5006 from=<pavar@somewhere.gr>
    Jun  6 11:14:42 server1 postfix/cleanup[23785]: 0EA1DCF01862: message-id=<7f58fd7910211e5bbc3ffb9c9aec5803@ihidthis.com>
    Jun  6 11:14:42 server1 postfix/qmgr[734]: 0EA1DCF01862: from=<pavar@hidden.com>, size=891, nrcpt=1 (queue active)
    Jun  6 11:15:01 server1 CRON[23792]: (root) CMD (/usr/local/ispconfig/server/server.sh > /dev/null 2>> /var/log/ispconfig/cron.log)
    Jun  6 11:15:01 server1 CRON[23793]: (getmail) CMD (/usr/local/bin/run-getmail.sh > /dev/null 2>> /dev/null)
    Jun  6 11:15:01 server1 pure-ftpd: (?@::1) [INFO] New connection from ::1
    Jun  6 11:15:01 server1 pure-ftpd: (?@::1) [INFO] Logout.
    Jun  6 11:15:01 server1 postfix/smtpd[22409]: warning: hostname localhost does not resolve to address ::1: No address associated with hostname
    Jun  6 11:15:01 server1 postfix/smtpd[22409]: connect from unknown[::1]
    Jun  6 11:15:01 server1 postfix/smtpd[22409]: lost connection after CONNECT from unknown[::1]
    Jun  6 11:15:01 server1 postfix/smtpd[22409]: disconnect from unknown[::1]
    Jun  6 11:15:01 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=::1, lip=::1, secured
    Jun  6 11:15:01 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=::1, lip=::1, secured
    Jun  6 11:15:01 server1 pure-ftpd: (?@::1) [INFO] New connection from ::1
    Jun  6 11:15:01 server1 pure-ftpd: (?@::1) [INFO] Logout.
    Jun  6 11:15:01 server1 postfix/smtpd[22409]: warning: hostname localhost does not resolve to address ::1: No address associated with hostname
    Jun  6 11:15:01 server1 postfix/smtpd[22409]: connect from unknown[::1]
    Jun  6 11:15:01 server1 postfix/smtpd[22409]: lost connection after CONNECT from unknown[::1]
    Jun  6 11:15:01 server1 postfix/smtpd[22409]: disconnect from unknown[::1]
    Jun  6 11:15:01 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=::1, lip=::1, secured
    Jun  6 11:15:01 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=::1, lip=::1, secured
    Jun  6 11:15:12 server1 postfix/smtp[23787]: connect to gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1a]:25: Connection timed out
    Jun  6 11:15:12 server1 postfix/smtp[23787]: 0EA1DCF01862: to=<pavargr@somewhere.com>, relay=gmail-smtp-in.l.google.com[173.194.78.26]:25, delay=31, delays=0.03/0.01/30/0.32, dsn=2.0.0, status=sent (250 2.0.0 OK 1370531712 lo8si28528702wjb.46 - gsmtp)
    Jun  6 11:15:12 server1 postfix/qmgr[734]: 0EA1DCF01862: removed
    I know that this:
    Code:
    warning: hostname localhost does not resolve to address ::1: No address associated with hostname
    has to do with IPv6, which I don't use, but either something is re-adding it, or I am trying to comment it out in the wrong place.

    Among other things, I have not found yet a satisfactory guide for multi-domain emailing. I would like the sender email from the form to be part of the specific domain, i.e. if the form was at example.com/contact , I would like the email to be sent from info @ example.com .
    Any help would be appreciated. This is my first VPS, I managed most of what I needed by myself with some guides and a lot of logic, but this one baffles me. I guess I don't have enough process infrastructure background to figure it out.
    Last edited by CharlesA; June 7th, 2013 at 03:35 PM. Reason: marked as solved

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,069
    Distro
    Kubuntu Development Release

    Re: Joomla and php mail with nginx, postfix and dovecot

    Is there an entry in /etc/hosts for localhost that points to 127.0.0.1? If not, add one and see if that helps.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Nov 2009
    Beans
    9

    Re: Joomla and php mail with nginx, postfix and dovecot

    Quote Originally Posted by SeijiSensei View Post
    Is there an entry in /etc/hosts for localhost that points to 127.0.0.1? If not, add one and see if that helps.
    Yes, there is

    Code:
    127.0.0.1 localhost.localdomain localhost

  4. #4
    Join Date
    Nov 2009
    Beans
    9

    Re: Joomla and php mail with nginx, postfix and dovecot

    on the other hand, I found and removed (again)
    Code:
    #::1 localhost

  5. #5
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Joomla and php mail with nginx, postfix and dovecot

    Are you able to send mail from the command line?

    Code:
    echo "Test" | mail -s "Test" emailaddress@domain.com
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  6. #6
    Join Date
    Nov 2009
    Beans
    9

    Re: Joomla and php mail with nginx, postfix and dovecot

    hmmm, i get
    Code:
    -bash: mail: command not found

  7. #7
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Joomla and php mail with nginx, postfix and dovecot

    You probably need to install the mailutils package:

    Code:
    sudo apt-get install mailutils
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  8. #8
    Join Date
    Nov 2009
    Beans
    9

    Re: Joomla and php mail with nginx, postfix and dovecot

    Quote Originally Posted by CharlesA View Post
    You probably need to install the mailutils package:

    Code:
    sudo apt-get install mailutils
    Thanks, that did the trick. Everything works fine

  9. #9
    Join Date
    Nov 2009
    Beans
    9

    Re: [SOLVED] Joomla and php mail with nginx, postfix and dovecot

    I discovered 2 more issues today. I cannot receive email, which is weird, since I had tested it and I cannot send from an email in my server to an email in my server.
    in the first case, I get an "user unknown in local recipient table" response from the server, while in the second scenario I get an error "mail loops back to myself".
    Any help would be appreciated.

  10. #10
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [SOLVED] Joomla and php mail with nginx, postfix and dovecot

    Are you using virtual mail accounts or does each person have an account on the physical server?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •