How to manipulate sendmail queues (post all your info here)

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

Slartibartfast
Posts: 1
Joined: Tue Sep 09, 2008 8:12 am

How to manipulate sendmail queues (post all your info here)

Post by Slartibartfast »

Hello folks,

the "out-of-the-box"-functionalities of OpenEMM astonish me.

The only thing that puzzles me is OEMM's dependency on starting its own sendmail queues. I am kindly requesting everybody to share his/her knowledge in this thread, as there are many sendmail-related questions in this forum, many of them unanswered. Let's work together here.

I should be happy if the answer to my own question should show up in this thread, too. I am fairly new to sendmail.

I have set up a Debian (Etch) server including sendmail 8.13.8 and cyrus 2.2 with saslauth2 over pam and mysql. Sendmail uses 2 mailqueues (/var/spool/mqueue and /var/spool/mqueue.in). The reason for this is a desperately needed mailscanner with spamassassin plus virusscanner installation, which runs perfectly fine. My server is a hosted root server.

Prior to starting OpenEMM, I stop sendmail (as root) and observe:

OpenEMM starts 3 mailqueues, two of which are located in its home directory: "admin" and "test". A third "mqueue-client" can be found in /var/spool. It seems that OEMM'S mailer.sh allows some manipulation of how sendmail is being invoked.

The thing is: the start parameters of the compliant mailqueue "mqueue-client" are coded within an if-clause - and I have no insight into OpenEMM's smctrl and thus do not know how mailer.sh can be changed to comply with my 2-queues-setup.

Can anyone please clarify matters - not only for me, but - for all of us and inform us about the following:

questions to other OEMM users and its developers:

= possible params to be passed through OpenEMM's smctrl

questions to people who are familiar with shell-scripting:

= possible code changes to if-clause in mailer.sh to persuade the sendmail invoked by OpenEMM to use /var/spool/mqueue instead of /var/spool/mqueue-client
= possible code changes to if-clause in mailer.sh to allow those of us using mailscanner to use /var/spool/mqueue plus /var/spool/mqueue.in again

Please feel free to add your own sendmail-related questions here. Maybe the information requested and hopefully gathered here could be condensed in a FAQ.

Good resources for everyone working with sendmail are:

http://www.sendmail.org/m4/readme.html
http://www.sendmail.org/~ca/email/ (this one seems not to be linked to from sendmail.org, highly interesting)
http://www.unix.com.ua/orelly/other/Sendmail_3rd/ (O'Reillys sendmail book online)

Thanks so much to everyone who will contribute!
Slartibartfast
sapeksh
Posts: 9
Joined: Wed Nov 19, 2008 7:14 am

Sendmail does not stop retry of timedout e-mail

Post by sapeksh »

Few of my mail addresses have wrong domains like gmmail.com, rediiifmail.com etc. OpenEMM/sendmail keeps trying to send mail to these addresses. It apparently has been trying to send them after every one minute since the last 15 hours.

Couple of questions:
1) How can i tell OpenEMM/Sendmail to not to retry sending mails if connection timeout is received for say 5 attempts?

2) How can i change the retry interval for such e-mails. Will updating the -q1m to -q120m for queue "QUEUE" in mailer.sh help?

Any help will be appreciated.
sapeksh
Posts: 9
Joined: Wed Nov 19, 2008 7:14 am

Resolution to the questions in my previous post

Post by sapeksh »

1) How can i tell OpenEMM/Sendmail to not to retry sending mails if connection timeout is received for say 5 attempts?

Resolution: Added the following configurations to my sendmail.m4 file
define(`confTO_RESOLVER_RETRANS_FIRST', `2s')
define(`confTO_RESOLVER_RETRY_FIRST', `2')
define(`confTO_RESOLVER_RETRANS_NORMAL', `10s')
define(`confTO_RESOLVER_RETRY_NORMAL', `5')

Still have to test it though with a batch of emails.

2) How can i change the retry interval for such e-mails. Will updating the -q1m to -q120m for queue "QUEUE" in mailer.sh help?

Resolution: Added the following configurations to my sendmail.m4 file:
define(`confMIN_QUEUE_AGE',`3h') (Default is every time the queue is scanned, which in mailer.sh is 1 minute)
define(`confTO_QUEUERETURN', `1d') (Default is 5 days)

Suggestions/improvements are welcome.
johannes_77
Posts: 19
Joined: Mon Mar 09, 2009 8:47 pm

Post by johannes_77 »

Hi,

just out of curiosity. Did this work for you? I am experiencing the exact same problem.

Regards
Johannes Siebert
sapeksh
Posts: 9
Joined: Wed Nov 19, 2008 7:14 am

Short answer: Yes it is working great for me

Post by sapeksh »

Yes it is working great for me. More details:

1) I'm currently able to send 4000+ mails at an average in an hour.

2) Primary boost was due to the second settings MIN_QUEUE_AGE. Since most of the mailers that I need to send are of the size which usually gets completed in 2-3 hours I've set it to 3 hours. You can tweak this around based to see what performs better for you.

Good luck.
Post Reply