Broadband
Dial-Up
Email
Hosting
Wireless
Security
Useful Tools
Quick Reference
Contact Us
Customer Portal
Site Search

Zen Internet Support Forum

Welcome to the Zen Internet community support forums.

Before posting we recommend you search our
extensive Knowledge Base or the forum archives
as an answer to your query may already be available.

Welcome to Zen Internet Support Forum Sign in | Join | Help
Forums Forum Rules

Sendmail problems

  •  20-06-2007, 5:23 PM

    Sendmail problems

    There is a question at the end of this, but let me explain the setup:

    I have a domain name mydomain.net which is registered by netscanuk. This points at my main of my Zen IP addresses for web purposes (I use port forwarding for incoming web requests). They also provide a mailbox with a mailhost address of mail.mydomain.net through which my mail client sends and receives mail, and I can access this using any ISP. All pretty straightforward so far. The authentication used is pop before smtp, so provided I log onto the mailserver to receive messages, I can also send for a short time afterwards.

    I also have (obviously!) a mail account with Zen, using their mailhost, mailhost.zen.co.uk which allows me to send e mail through their mailhost, but only from an IP address in their address space, which precludes connecting through another ISP (for example when travelling) but otherwise causes no problems.

    So much for conventionbal e mail.

    Now the real problem!

    I am running a Linux setup (Fedora Core6) which generates system e mail, Cron reports, logwatch reports etc, which is processed by sendmail and goes into a local mailbox. These emails take the form (typically) root@localhost.localdomain, and that is not a major problem. However I also use apache as the webhost to host a web site, some of which generates mail - in particular user passwords. These are generated as from apache@localhost.localdomain. When these were addressed to me (webmaster@mydomain.net) I very occasionally received them via my normal mail; client - so they had gone out over the internet to mail.mydomain.net from where my mail client would collect them. However many went missing and those that did get through were ofter delayed several days - and a whole chunk would arrive together. I didn't really investigate, but I surmise that sendmail was indeed acting as it should, but mail addressed to me was only being accepted by mail.mydomain.net on the odd occasions when my regular mail client had just accessed it to collect mail, and therefore it was open to receive mail. Just happy coincidence!

    As use of the website is increasing, this is not very good, so I need to use sendmail to relay to a smart host. Early attempts using mail.mydomain.net were no more successful because of the POP before SMTP authentication. So my next plan was to set the relay to mailhost.zen.co.uk This returned a failure on the lines of reverse DNS failed - because the originating address was shown as xxx@localhost.localdomain. I resolved this by setting the sendmail config file to give my system the name mydomain.net. Thjis has partially solved the problem, and more mail gets through, however I still get sendmail log messages like this:



    Jun 20 17:01:07 peter_l sendmail[1980]: l5KG07NZ001977: to=peter.boraston@zen.co.uk, ctladdr=<root@localhost.localdomain> (0/0), delay=00:01:00, xdelay=00:00:40, mailer=relay, pri=31284, relay=mailhost.zen.co.uk, dsn=4.0.0, stat=Deferred: Name server: mailhost.zen.co.uk: host name lookup failure

    Similarly

    Jun 19 09:02:53 peter_l sendmail[20903]: l5J82XiK020903: from=apache, size=205, class=0, nrcpts=1, msgid=<200706190802.l5J82XiK020903@localhost.localdomain>, relay=apache@localhost

    where apache has generated a message, but the relay is shown as apache@localhost. Here for test purposes, the recipient was me@mydomain.net -one of the slight snags in telling sendmail that I am mydomain.net as that email is not relayed at all (why should it be, the user is on this system!)

    A beeter example is this where the recipient address was my zen email address.

    Jun 19 10:14:05 peter_l sendmail[21565]: l5J9Cjfc021561: to=<peter.boraston@zen.co.uk>, ctladdr=<apache@localhost.localdomain> (48/48), delay=00:01:00, xdelay=00:00:40, mailer=relay, pri=120449, relay=mailhost.zen.co.uk, dsn=4.0.0, stat=Deferred: Name server: mailhost.zen.co.uk: host name lookup failure

    Note the last part - it is using mailhost.zen.uk as a nameserver which it obviously isnt!

    This is a log entry from a successful send:

    Jun 20 16:59:20 peter_l sendmail[1951]: l5KD0PZa000835: to=peter.boraston@zen.co.uk, ctladdr=<root@localhost.localdomain> (0/0), delay=02:58:55, xdelay=00:00:00, mailer=relay, pri=301286, relay=mailhost.zen.co.uk. [212.23.3.98], dsn=2.0.0, stat=Sent (OK id=1I12aW-0007vl-N1)

    Note that after relay=mailhost.zen.uk is the mailhost IP address. Again mail appears to be sent in big chunks, and seems to be either after my regular mail client has accessed the zen mailhost OR when a system generated messgae (usually cron or logwatch generates a message . (I have aliased mail destined for root to go to my me@zen.co.uk) Again, mail sent via my regular mail client is sent without any problems.

    After all this the question is

    What should I be doing to ensure that when ever system mail is generated, it is always successfully relayed to mailhost.zen.co.uk? Is it an authentication problem, a sendmail problem, or a DNS related problem?

    Many thanks for reading this far - any help gratefully received!

    PS - I should add that I do NOT act as an open relay - there are no domains from which I accept mail!!

    OK - a few hours later - I think this is a DNS problem - putting the IP address in place of mailhost.zen.co.uk seems to improve reliability, although the system still needs the mydomain.net in the hosts file - although it doesn't need to be in the sendmail.cf file.


    The box said "needs Windows 2000 or better" so I installed Fedora Core 6
View Complete Thread