Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
generate error mail on demand
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rob  
View profile  
 More options Oct 11 2012, 10:43 am
Newsgroups: comp.mail.sendmail
From: Rob <nom...@example.com>
Date: 11 Oct 2012 14:42:51 GMT
Local: Thurs, Oct 11 2012 10:42 am
Subject: generate error mail on demand
Is there a command in sendmail that requests a certain item in
the queue to be returned to the sender before the QUEUERETURN
timer runs out?

Preferably with an error message specified to that command.

I imagine something like:

sendmail -return -q q9BEI6c5003729 -msg "misspelled mailaddress".

The reason I ask is that I would like to write a script that
examines the queue finding messages that sit there for some time,
e.g. an hour, and tries to identify certain common errors that
make the delivery fail but are not resolved by sendmail until
the timer runs out completely.

In our organization, people often make spelling errors in mail
domain names, and often domain squatters have registered those
domains but do not run a mailserver on them.  It takes a long time
before the sender of the message gets informed about this, and
to improve service I would like to return the mail quicker in
that case.
(without decreasing the retry time too much in cases where the
receiving system is unreachable for another reason)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob  
View profile  
 More options Oct 23 2012, 4:24 am
Newsgroups: comp.mail.sendmail
From: Rob <nom...@example.com>
Date: 23 Oct 2012 08:23:57 GMT
Local: Tues, Oct 23 2012 4:23 am
Subject: Re: generate error mail on demand

I hoped to still find some sendmail experts here, but it looks
like the group is filled with newbies crossposting from linux
groups.

Is there anyone who knows how the above can be done?
Maybe with a sendmail invocation with a special-purpose sendmail.cf?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Scott  
View profile  
 More options Oct 23 2012, 6:04 am
Newsgroups: comp.mail.sendmail
From: Mike Scott <usenet...@scottsonline.org.uk.invalid>
Date: Tue, 23 Oct 2012 11:04:36 +0100
Local: Tues, Oct 23 2012 6:04 am
Subject: Re: generate error mail on demand
On 23/10/12 09:23, Rob wrote:

I suspect some would find that sort of comment unhelpful.

> Is there anyone who knows how the above can be done?
> Maybe with a sendmail invocation with a special-purpose sendmail.cf?

AFAIAA sendmail won't do this (but I speak as a decided inexpert, so IMBW)

However, if you don't mind a 'dirty' solution, how about your periodic
checking script sticks the message id's (or some other good identifier)
of the "bad" messages into a file somewhere, while a milter picks up on
those and forces an immediate failure on the next q run. I suspect it
would be easy enough to code a hook for mimedefang to do this, or roll
your own milter. Or, come to think of it, possibly just build the whole
lot into mimedefang.

--
Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob  
View profile  
 More options Oct 23 2012, 6:24 am
Newsgroups: comp.mail.sendmail
From: Rob <nom...@example.com>
Date: 23 Oct 2012 10:24:04 GMT
Local: Tues, Oct 23 2012 6:24 am
Subject: Re: generate error mail on demand

Mike Scott <usenet...@scottsonline.org.uk.invalid> wrote:
>> I hoped to still find some sendmail experts here, but it looks
>> like the group is filled with newbies crossposting from linux
>> groups.

> I suspect some would find that sort of comment unhelpful.

It looks like I'm not the only one with this opinion...
I don't mind people asking questions but it can go too far.

>> Is there anyone who knows how the above can be done?
>> Maybe with a sendmail invocation with a special-purpose sendmail.cf?

> AFAIAA sendmail won't do this (but I speak as a decided inexpert, so IMBW)

> However, if you don't mind a 'dirty' solution, how about your periodic
> checking script sticks the message id's (or some other good identifier)
> of the "bad" messages into a file somewhere, while a milter picks up on
> those and forces an immediate failure on the next q run. I suspect it
> would be easy enough to code a hook for mimedefang to do this, or roll
> your own milter. Or, come to think of it, possibly just build the whole
> lot into mimedefang.

Ok is it possible to invoke a milter on a queue run?
That could be a way...

What I was thinking about when mentioning "a special-purpose sendmail.cf"
is to create a sendmail.cf with a very short maximum queue lifetime and
then invoke sendmail -q with that cf file.  However, I probably need
to move the messages to another mqueue dir and specify that in the .cf
to be sure it won't return the wrong messages.

Life would be so much easier when those domain harversters/parkers would
run an SMTP server that refuses all messages....   that should not be
much effort compared to the websites that they already implement.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Winfried Magerl  
View profile  
 More options Oct 23 2012, 6:45 am
Newsgroups: comp.mail.sendmail
From: Winfried Magerl <winfried.mag...@siemens.com>
Date: Tue, 23 Oct 2012 10:45:07 +0000 (UTC)
Local: Tues, Oct 23 2012 6:45 am
Subject: Re: generate error mail on demand
In article <slrnk8cs24.e8q.nom...@xs8.xs4all.nl>,

if it's only about the final error-mail and not about the error-text:

feel free to read the manual-page, especially how to set options like:
        '-O Timeout.queuereturn='

and how to call queue-runner based on sender/queue-id/recipient, e.g.:
        -qS.......

>However, I probably need
>to move the messages to another mqueue dir and specify that in the .cf
>to be sure it won't return the wrong messages.

If you're able to get the queue-ID for the specific mail something like
this from a shell-script:
/usr/sbin/sendmail -qI<queue-id> -O Timeout.queuereturn=<time>

>Life would be so much easier when those domain harversters/parkers would
>run an SMTP server that refuses all messages....   that should not be
>much effort compared to the websites that they already implement.

Maybe some general queue-runner for error-mails only (started from cron):
        /usr/sbin/sendmail -qS<> -O Timeout.queuereturn=12h

regards

        winfried

--
Winfried Magerl - Internet Administration
AtoS IT Solutions and Services, 81739 Munich, Germany
Internet-Mail: winfried.mag...@atos.net
Phone: +49 211 39922784


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob  
View profile  
 More options Oct 23 2012, 7:33 am
Newsgroups: comp.mail.sendmail
From: Rob <nom...@example.com>
Date: 23 Oct 2012 11:33:32 GMT
Local: Tues, Oct 23 2012 7:33 am
Subject: Re: generate error mail on demand

Ok, that is a good hint!  Thank you.
I was not aware that I could pass those options via the commandline,
and envisioned having a second config file and passing that.

I use "O ErrorHeader=/filename" in the sendmail.cf to provide some more
help in local language for the users, and I probably can pass a
-O ErrorHeader=/otherfilename to provide information for this special
case.

>>However, I probably need
>>to move the messages to another mqueue dir and specify that in the .cf
>>to be sure it won't return the wrong messages.

> If you're able to get the queue-ID for the specific mail something like
> this from a shell-script:
> /usr/sbin/sendmail -qI<queue-id> -O Timeout.queuereturn=<time>

Yes, the idea is to write a script that identifies the mails in the queue
that have been there for maybe half an hour, and try to retrieve some
information like "host -t NS", "host -t MX" and maybe "whois", to identify
the wellknown domain harversters and parkers.

Then I can quicky return the mails sent to domains like gmail.nl
(instead of .com) and hotmial.com or similar.

>>Life would be so much easier when those domain harversters/parkers would
>>run an SMTP server that refuses all messages....   that should not be
>>much effort compared to the websites that they already implement.

> Maybe some general queue-runner for error-mails only (started from cron):
>    /usr/sbin/sendmail -qS<> -O Timeout.queuereturn=12h

I already have set a 4h queuewarn and 36h queuereturn in sendmail.cf,
well below the "recommended values", to have better information for the
users, but it would still be nice to be able to inform them quicker.

But at the same time, I hesitate to directly mess with the files in the
mqueue directory, so I prefer to do things via sendmail commands.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Loki Harfagr  
View profile  
 More options Oct 23 2012, 9:00 am
Newsgroups: comp.mail.sendmail
From: Loki Harfagr <l...@thedarkdesign.free.fr.INVALID>
Date: 23 Oct 2012 13:00:01 GMT
Local: Tues, Oct 23 2012 9:00 am
Subject: Re: generate error mail on demand
Tue, 23 Oct 2012 11:33:32 +0000, Rob did cat :

you may like to simplify the pre-sorting in using some queuegroup
dedicated to "every typo you already know", another queuegroup dedicated to
"not yet seen but probable finger crosses" and setup these groups with
specific timers/mailers/RTFM.
 You'll then have it easier to spot the "not yet seen nor imagined" typos
in the main queue :-) (you'll be surprised, after years and years
on the queue I'm still amazed by users abilities to warp9 anything ;-)

for the queuegroups if you don't already manage that point see the
manual the README and the "bat boot".

Cheers.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob  
View profile  
 More options Oct 23 2012, 10:38 am
Newsgroups: comp.mail.sendmail
From: Rob <nom...@example.com>
Date: 23 Oct 2012 14:37:57 GMT
Local: Tues, Oct 23 2012 10:37 am
Subject: Re: generate error mail on demand

Loki Harfagr <l...@thedarkdesign.free.fr.INVALID> wrote:
> you may like to simplify the pre-sorting in using some queuegroup
> dedicated to "every typo you already know", another queuegroup dedicated to
> "not yet seen but probable finger crosses" and setup these groups with
> specific timers/mailers/RTFM.
>  You'll then have it easier to spot the "not yet seen nor imagined" typos
> in the main queue :-) (you'll be surprised, after years and years
> on the queue I'm still amazed by users abilities to warp9 anything ;-)

Yes, unfortunately the number of errors in domain typing is huge, and
at the same time I don't want to blacklist a domain completely.

Right now, gmail.nl is an invalid domain for mail, but it has been registered
by a parking service on behalf of Google and it could happen any time
that Google start to offer addresses on that domain.

I don't want to have to keep an eye on those "bad domains" all the time to
see if they might have become valid.

That is why I don't want to handle mails as the first pass through.
(e.g. in an access rule)

My plan is to watch mails only after they have been sitting in the queue
for say half an hour, so it is unlikely that they sit there only because
of greylisting or temporary overload of destination server, and then try
to investigate the situation.

That is difficult enough by itself.  For a human it is very easy to
identify those parked domains when looking at the DNS and WHOIS, but
I'm not sure if it will be easy for a script.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Claus Aßmann -no-copies-please  
View profile  
 More options Oct 23 2012, 12:20 pm
Newsgroups: comp.mail.sendmail
From: Claus Aßmann <ca+sendmail(-no-copies-please)@mine.informatik.uni-kiel.de>
Date: 23 Oct 2012 16:15:48 GMT
Local: Tues, Oct 23 2012 12:15 pm
Subject: Re: generate error mail on demand

Rob  wrote:
> Is there a command in sendmail that requests a certain item in
> the queue to be returned to the sender before the QUEUERETURN
> timer runs out?

Simply set the timeout to "now".

The fine documentation (op.*) says:

         The value "now" can be used for -O Timeout.queuereturn to
         return entries immediately during a queue run, e.g., to
         bounce messages independent of their time in the queue.

sendmail -O Timeout.queuereturn=now -qIsomeid ...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob  
View profile  
 More options Oct 23 2012, 1:09 pm
Newsgroups: comp.mail.sendmail
From: Rob <nom...@example.com>
Date: 23 Oct 2012 17:09:27 GMT
Local: Tues, Oct 23 2012 1:09 pm
Subject: Re: generate error mail on demand

Claus Aßmann <ca+sendm...@mine.informatik.uni-kiel.de> wrote:
> Rob  wrote:
>> Is there a command in sendmail that requests a certain item in
>> the queue to be returned to the sender before the QUEUERETURN
>> timer runs out?

> Simply set the timeout to "now".

> The fine documentation (op.*) says:

>     The value "now" can be used for -O Timeout.queuereturn to
>     return entries immediately during a queue run, e.g., to
>     bounce messages independent of their time in the queue.

> sendmail -O Timeout.queuereturn=now -qIsomeid ...

Thank you!

I presume I can send some errortext by using:

sendmail -O Timeout.queuereturn=now -O ErrorHeader=/etc/mail/message -qIsomeid


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob  
View profile  
 More options Oct 24 2012, 3:24 am
Newsgroups: comp.mail.sendmail
From: Rob <nom...@example.com>
Date: 24 Oct 2012 07:24:34 GMT
Local: Wed, Oct 24 2012 3:24 am
Subject: Re: generate error mail on demand

It works, I have created a basically single-line (plus arg checking
and usage message) shell script that returns a message by ID.

Now on to the next step, writing a perl program that interprets the
output of mailq and invokes that script when appropriate.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »