Domains using non-default IP don't deli...

Webmin
2012-06-21
2013-05-22
  • Spencer Hill
    Spencer Hill
    2012-06-21

    I'm new to Virtualmin and Webmin, and I recently migrated four working websites that have a unique IP and SSL certificate to my server. After doing so I discovered that any forms on these websites, such as a contact form, no longer deliver email messages as they should.

    Someone mentioned that this is a known and common issue with Apache configurations in Virtualmin/Webmin but didn't offer a solution or any further explanation. Can anyone help me? Thank you!

     
  • Spencer Hill
    Spencer Hill
    2012-06-21

    Update

    So it appears that mail IS being delivered from all domains and IP's on the server. However, it's NOT being delivered to some addresses. For example, I submitted a contact form that emailed my Google Apps account, but not my private email server.

    Any thoughts?

     
  • daves
    daves
    2012-06-22

    On your private mail server criteria is not being met to allow delivery from your webserver? For example, maybe the system your webserver resides on does not have any reverse DNS and your SMTP server does not allow delivery from systems that do not havea valid reverse DNS.

    You coudl: tail -f /var/log/mail.log | grep email@address.com

    Submit something to that address from your webserver and see what happens

     
  • Spencer Hill
    Spencer Hill
    2012-06-22

    Thanks for the reply, but your first sentence doesn't totally make sense to me. Can you reiterate that?

    If I understand you correctly, you should know that my DNS is pointed to mediatemple.net - who is also my registrar. So I'm not running DNS on this server that is in question.

    Does that change things?

    Thank you!

     
  • daves
    daves
    2012-06-22

    From what I gathered from your original post you have 2 of your own servers. One is your private mail server, one is your webserver that you moved some sites to. I assumed they were on the same network and local to you. If any of that is incorrect, most of what I said and am going to say after this incorrect.

    What I was suggesting is that you have appropriately configured your mail server to reject mail from other servers if certain conditions are not met to help prevent spam. One of the configurations may include denying mail from systems that do not have reverse DNS configured correctly. If you need a quick lesson on what reverse DNS is please use your favorite search engine and search for what forward and reverse DNS is.

    Also I am suggesting you check or watch your logs for errors, or for what happens when/if delivery is attempted to your mail server. Depending on how your webserver is set up you could also watch the logs on that server and see what happens with the email when the form is submitted.

    Myself, usually I use the program called tail.

    To watch log entries as the happen: tail -f /var/log/logfilename

    To only show entries containing certain text as they happen: tail -f /var/log/logfilename | grep certaintext

    To only see log entries as they happen for a certain address I suggested: tail -f /var/log/mail.log | grep email@address.com

    Use whatever combination of that to watch the logs to see what is happening with the email on the sending and receiving server.

     
  • Spencer Hill
    Spencer Hill
    2012-06-22

    Ah, okay. Well, Postfix (this is the "mail server" correct?) is running on the same server as the websites themselves. I was just saying that the Bind server (I think that's the right word) is managed by Media Temple. So messing with that isn't even accessible to me.

    And we're not having difficulty receiving mail to the server, rather when the server sends mail, it is not delivered to Google Apps domains, and some other private servers.

     
  • Spencer Hill
    Spencer Hill
    2012-06-22

    Oh, sorry, I meant to say thank you again for your response too! :)

     
  • daves
    daves
    2012-06-22

    Oh then just check your logs and see what happens with the email when it is sent :)

     
  • Spencer Hill
    Spencer Hill
    2012-06-22

    Cool, here's what I'm seeing:

    Jun 21 22:51:57 localhost postfix/pickup[8110]: B6BFD801FB: uid=1088 from=<qey62jn2>
    Jun 21 22:51:57 localhost postfix/cleanup[9936]: B6BFD801FB: message-id=<356b8f907ef19b0979612a78a37840ae@www.myclientdomain.com>
    Jun 21 22:51:57 localhost postfix/qmgr[8111]: B6BFD801FB: from=<qey62jn2@mypersonaldomain.com>, size=585, nrcpt=1 (queue active)
    Jun 21 22:51:57 localhost postfix/trivial-rewrite[9937]: warning: do not list domain mypersonaldomain.com in BOTH mydestination and virtual_alias_domains
    Jun 21 22:51:57 localhost postfix/local[9938]: B6BFD801FB: to=<spencerhill@mypersonaldomain.com>, relay=local, delay=0.04, delays=0.03/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "spencerhill")
    Jun 21 22:51:57 localhost postfix/cleanup[9936]: BE44180265: message-id=<20120621225157.BE44180265@www.mypersonaldomain.com>
    Jun 21 22:51:57 localhost postfix/bounce[9939]: B6BFD801FB: sender non-delivery notification: BE44180265
    Jun 21 22:51:57 localhost postfix/qmgr[8111]: BE44180265: from=<>, size=2547, nrcpt=1 (queue active)
    Jun 21 22:51:57 localhost postfix/trivial-rewrite[9937]: warning: do not list domain mypersonaldomain.com in BOTH mydestination and virtual_alias_domains
    Jun 21 22:51:57 localhost postfix/qmgr[8111]: B6BFD801FB: removed
    Jun 21 22:51:58 localhost postfix/local[9938]: BE44180265: to=<qey62jn2@mypersonaldomain.com>, relay=local, delay=0.58, delays=0/0/0/0.58, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
    Jun 21 22:51:58 localhost postfix/qmgr[8111]: BE44180265: removed
    
     
  • daves
    daves
    2012-06-25

    You need to view the portion of the log that lists the delivery attempt of the email.

     
  • Spencer Hill
    Spencer Hill
    2012-07-06

    Can you be more specific? I thought the snippet above was that information…

    Here is the latest message from mail.log:

    <code>
    Jul  6 22:01:13 www postfix/pickup: 14C59801F0: uid=0 from=<root>
    Jul  6 22:01:13 www postfix/cleanup: 14C59801F0: message-id=<20120706220113.14C59801F0@www.mypersonaldomain.com>
    Jul  6 22:01:13 www postfix/qmgr: 14C59801F0: from=<root@mypersonaldomain.com>, size=383, nrcpt=1 (queue active)
    Jul  6 22:01:13 www postfix/local: 14C59801F0: to=<myemail@mypersonaldomain.com>, relay=local, delay=0.08, delays=0.06/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "spencerhill")
    Jul  6 22:01:13 www postfix/cleanup: 1E677802AC: message-id=<20120706220113.1E677802AC@www.mypersonaldomain.com>
    Jul  6 22:01:13 www postfix/bounce: 14C59801F0: sender non-delivery notification: 1E677802AC
    Jul  6 22:01:13 www postfix/qmgr: 1E677802AC: from=<>, size=2267, nrcpt=1 (queue active)
    Jul  6 22:01:13 www postfix/qmgr: 14C59801F0: removed
    Jul  6 22:01:13 www postfix/local: 1E677802AC: to=<root@mypersonaldomain.com>, relay=local, delay=0.33, delays=0/0/0/0.33, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
    Jul  6 22:01:13 www postfix/qmgr: 1E677802AC: removed
    </code>

    I want to mention that I established an SMTP Relay service with MailJet and configured Webmin to utilize it. While it did seem to work, I was getting error messages like this:

    <code>
    /var/logs/mail.err: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
    /var/logs/mail.log:
    Jul  6 21:26:59 www postfix/smtpd: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
    Jul  6 21:27:00 www postfix/master: warning: process /usr/lib/postfix/smtpd pid 24339 exit status 1
    Jul  6 21:27:00 www postfix/master: warning: /usr/lib/postfix/smtpd: bad command startup - throttling
    Jul  6 21:28:00 www postfix/smtpd: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
    Jul  6 21:28:01 www postfix/master: warning: process /usr/lib/postfix/smtpd pid 24494 exit status 1
    Jul  6 21:28:01 www postfix/master: warning: /usr/lib/postfix/smtpd: bad command startup - throttling
    Jul  6 21:29:01 www postfix/smtpd: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
    Jul  6 21:29:02 www postfix/master: warning: process /usr/lib/postfix/smtpd pid 24597 exit status 1
    Jul  6 21:29:02 www postfix/master: warning: /usr/lib/postfix/smtpd: bad command startup - throttling
    </code>

    So I've disabled it again so as to avoid those messages for now. I don't seem to get different results in terms of mail delivery.