Author Topic: Sendmail Fix -- Sending error. Check your mail settings.  (Read 24051 times)

r.helfenberger

  • Posts: 4
    • View Profile
Sendmail Fix -- Sending error. Check your mail settings.
« on: February 22, 2007, 06:04:49 pm »
Hi I'v got an "Sending error. Check your mail settings." during sending a mailing. I increased the log level of sendmail to see what happens. This is what I found in the maillog
Quote

Feb 22 18:22:37 cl-1041 sendmail[21103]: NOQUEUE: connect from localhost [127.0.0.1]
Feb 22 18:22:37 cl-1041 sendmail[21103]: AUTH: available mech=PLAIN CRAM-MD5 LOGIN DIGEST-MD5 ANONYMOUS, allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: Milter: no active filter
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 220 myserver.mydomain.ch ESMTP Sendmail 8.13.7/8.13.4; Thu, 22 Feb 2007 18:22:37 +0100
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: <-- EHLO localhost
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-myserver.mydomain.ch Hello localhost [127.0.0.1], pleased to meet you
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-ENHANCEDSTATUSCODES
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-PIPELINING
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-8BITMIME
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-SIZE
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-DSN
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-ETRN
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-AUTH DIGEST-MD5 CRAM-MD5
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250-DELIVERBY
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250 HELP
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: <-- NOOP
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250 2.0.0 OK
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: <-- MAIL FROM: <list>
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250 2.1.0 <list>... Sender ok
Feb 22 18:22:37 cl-1041 sendmail[21103]: l1MHMb4r021103: <-- RCPT TO: <info>
Feb 22 18:23:51 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 451 hrc-telecom.ch: Name server timeout
Feb 22 18:23:51 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 050 <info>... Transient parse error -- message queued for future delivery
Feb 22 18:23:51 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 451 hrc-telecom.ch: Name server timeout
Feb 22 18:23:51 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 250 2.1.5 <info>... Recipient ok (will queue)
Feb 22 18:23:51 cl-1041 sendmail[21103]: l1MHMb4r021103: --- 421 4.4.1 myserver.mydomain.ch Lost input channel from localhost [127.0.0.1]
Feb 22 18:23:51 cl-1041 sendmail[21103]: l1MHMb4r021103: lost input channel from localhost [127.0.0.1] to MTA after rcpt
Feb 22 18:23:51 cl-1041 sendmail[21103]: l1MHMb4r021103: from=<list>, size=0, class=0, nrcpts=1, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]

After that the mailing stops. My interpretation: This is due to the error 451 or 421 4.4.1. I already read in this forum that I have to remove the first line in lm_sendq to make it possible to resume my mailing.
What I'm asking me: Is it really a good idea that one single E-Mail-address with a timeout error can stop the whole mailing? Shouldn't there be a fallback to automatically disable "corrupt" adresses and to continue the mailing automatically?

Best regards

Ralph

DW

  • Administrator
  • Posts: 3775
    • View Profile
    • http://listmailpro.com
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #1 on: February 23, 2007, 02:10:48 am »
Hi Ralph,

This seems to only happen on sendmail systems and, I believe, has to do with the fact that the mailer does a DNS lookup on the domain.

If you can figure out a way to turn off that feature you should be ok.

I don't recommend deleting a line from the send queue, although that can work.

What I would try is to set the line $smtp_timeout = 9; in config.php.  That should cause ListMail to only wait 9 seconds before issuing a "RSET" command to the SMTP server, which should allow it to move on the next email address.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

r.helfenberger

  • Posts: 4
    • View Profile
Reply Notification - Sending error. Check your mail settings
« Reply #2 on: February 23, 2007, 07:22:54 am »
Hi Dean
Quote

What I would try is to set the line $smtp_timeout = 9; in config.php. That should cause ListMail to only wait 9 seconds before issuing a "RSET" command to the SMTP server, which should allow it to move on the next email address.


This is exactly the problem in this case: The mailing doesn't continue but is interrupted. Changing the $smtp_timeout to a different value doesn't change this behaviour. I also can't resume the mailing because it always stopped again with the first line from lm_sendq. If the mailing would continue this would be fine.

Are you suggesting me that using php mail instead of sendmail is the more robust solution?

Ralph

DW

  • Administrator
  • Posts: 3775
    • View Profile
    • http://listmailpro.com
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #3 on: February 23, 2007, 09:16:27 am »
Ralph,

In my experience with this problem I have found increasing the SMTP timeout to 30, 45 or even 60 can help.  I am actually considering raising the default value due to this same issue on another installation.

You might try removing the offending user(s) from future mailing with a custom SQL query you can run through PhpMyAdmin:

delete from lm_users where id = '$USERID';

or

update lm_users set cnf = '2' where id = '$USERID';

Replace $USERID with the users' ID from lm_sendq (uid field)

I don't suggest sending your list email through PHP mail.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

mike2

  • Posts: 193
    • View Profile
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #4 on: February 23, 2007, 02:42:46 pm »
I use sendmail and never have this problem... because it's configured properly ( well mostly ).

What you want to do is make sure sendmail is in queue mode, so it queues the messages first, then when it runs the queue it delivers them ( or attempts to).

Here's some code for the sendmail.mc file, the first one puts it in queue mode, the last few make sure no dns lookup is done on the initial pass from LMP to sendmail:

Code: [Select]

define(`confDELIVERY_MODE', `q')

define(`confDONT_PROBE_INTERFACES', `true')
define(`confDIRECT_SUBMISSION_MODIFIERS', `C')
define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')
FEATURE(`nocanonify', `canonify_hosts')


Let me know if that helps.  If you are familiar with sendmail this will make sense, if not it will be crazy...   rebuild your .cf file and restart sendmail.

DW

  • Administrator
  • Posts: 3775
    • View Profile
    • http://listmailpro.com
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #5 on: February 24, 2007, 12:52:42 am »
There must be a config setting somewhere for this.  What about what's mentioned here?
Quote
Use FEATURE(accept_unresolvable_domains) when building sendmail.cf.
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

mike2

  • Posts: 193
    • View Profile
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #6 on: February 25, 2007, 06:38:19 pm »
I think that's a bit dangerous, the features I listed above do exactly what is needed...  They delay the DNS check until the queue runner comes to pick up the job.  They don't hinder the initial submission, it works like this:

LMP sends the message to Sendmail, There are NO checks performed on the recipient at this time.  It sits in the queue for 1 minute ( adjustable ) then a completely seperate process ( queue runner ) comes along to work on the message and does it's job seperately in the background from there.  NO MAILING TIMEOUTS, ETC...  EVEN WITH A LIST OF 150K.

DW

  • Administrator
  • Posts: 3775
    • View Profile
    • http://listmailpro.com
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #7 on: February 26, 2007, 12:24:05 am »
Mike, you're the sendmail expert :D  The single-most relevant line must be as you suggest:
Code: [Select]
define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')
I should pay more attention.

I've been lost in qmail-patch hell with Plesk for about 2 days now but got it figured out and learned some stuff in the process.  Time to work on the LMP update again. ;)
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

r.helfenberger

  • Posts: 4
    • View Profile
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #8 on: March 16, 2007, 07:42:02 am »
Hello Mike2
Thanks for your suggestion. I implemented it as you suggested and it works fine. I think the separation of the process queueing the mails and sending the mails is a good idea.

Ralph

mike2

  • Posts: 193
    • View Profile
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #9 on: March 16, 2007, 10:44:02 am »
Quote
Mike, you're the sendmail expert


Not quite an expert per se, but enough to make me dangerous and sometimes helpful...  :lol:

Quote from: "r.helfenberger"
Hello Mike2
Thanks for your suggestion. I implemented it as you suggested and it works fine. I think the separation of the process queueing the mails and sending the mails is a good idea.

Ralph


Glad to hear it helped you.  Yes I 100% believe the two processes should be separate honestly.

andrew

  • Posts: 27
    • View Profile
How to Modify SendMail?
« Reply #10 on: July 12, 2007, 06:26:06 pm »
Hi Mike,

Per DW, this seems like the solution that would greatly assist us as our SMTP sending continues to timeout with a Server 250 error after sending only 50-1000 emails. Our lists are several thousand so we weren't sure what to do.

Only thing is, how/where do you modify the sendmail.mc file?

We're working on our own dedicated server - so we've got access to do as required.

Thank you!!
Andrew Golden


Quote from: "mike2"
I use sendmail and never have this problem... because it's configured properly ( well mostly ).

What you want to do is make sure sendmail is in queue mode, so it queues the messages first, then when it runs the queue it delivers them ( or attempts to).

Here's some code for the sendmail.mc file, the first one puts it in queue mode, the last few make sure no dns lookup is done on the initial pass from LMP to sendmail:

Code: [Select]

define(`confDELIVERY_MODE', `q')

define(`confDONT_PROBE_INTERFACES', `true')
define(`confDIRECT_SUBMISSION_MODIFIERS', `C')
define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')
FEATURE(`nocanonify', `canonify_hosts')


Let me know if that helps.  If you are familiar with sendmail this will make sense, if not it will be crazy...   rebuild your .cf file and restart sendmail.

mike2

  • Posts: 193
    • View Profile
Re: How to Modify SendMail?
« Reply #11 on: July 12, 2007, 06:55:46 pm »
Quote from: "andrew"
Only thing is, how/where do you modify the sendmail.mc file?


Normally it's in:  "/etc/mail"

But I use Redhat ( errr well now it's Fedora )... so I'm sure the location may vary with your server.  Simply do a "locate sendmail.mc" to find it.  You may need to do a "updatedb" first if needed.

-----

As for the "how" part, well that can be a bit more complicated and I highly suggest reading up on it, maybe the documentation at sendmail.org.

But basically you simply edit "sendmail.mc" in your favorite editor, adding the above where appropriate ( this is important ), then depending on your sendmail.mc/cf location, run "m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf" then restart sendmail, "service sendmail restart".

Hope that helps.

andrew

  • Posts: 27
    • View Profile
Re: How to Modify SendMail?
« Reply #12 on: July 13, 2007, 04:33:19 am »
Quote from: "mike2"


As for the "how" part, well that can be a bit more complicated and I highly suggest reading up on it, maybe the documentation at sendmail.org. Hope that helps.


Mike - Thank you!

I'll tell you, I know enough to know that this whole thing is over my head and I need to get some help.

But thank you for the post.

Andrew

mike2

  • Posts: 193
    • View Profile
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #13 on: July 13, 2007, 06:39:13 pm »
Quote
I'll tell you, I know enough to know that this whole thing is over my head and I need to get some help.


I may consider helping you out with this sendmail part if you wish, maybe for a small fee ( Dean I hope you don't mind me doing this here, if so erase this and let me know ).

I'm guessing if your system is pretty normal I could do it for say $50.  If you wish to discuss it further PM me on here and I will give you my email address and we can talk further, thanks.

EDIT - Just noticed PM was disabled so email me:  <edited>

andrew

  • Posts: 27
    • View Profile
Sendmail Fix -- Sending error. Check your mail settings.
« Reply #14 on: July 13, 2007, 06:56:55 pm »
DEAL!!

Emailing now and THANK YOU!

Andrew


Quote from: "mike2"
Quote
I'll tell you, I know enough to know that this whole thing is over my head and I need to get some help.


I may consider helping you out with this sendmail part if you wish, maybe for a small fee ( Dean I hope you don't mind me doing this here, if so erase this and let me know ).

I'm guessing if your system is pretty normal I could do it for say $50.  If you wish to discuss it further PM me on here and I will give you my email address and we can talk further, thanks.

EDIT - Just noticed PM was disabled so email me:  <edited>