procmail problem
am 26.02.2006 13:05:13 von Sebastian Deiszner
Hello,
i want to reject a mail and then i want to send the sender of the mail a
message.
But the mail is not send - what could i do?
thanx
:0:
* > 200000
{
echo "mail is to big - max 200 kilobytes" | mail $SENDER
EXITCODE=77
:0
/dev/null
}
Re: procmail problem
am 26.02.2006 19:49:48 von keeling
Sebastian Deiszner :
>
> I want to reject a mail and then i want to send the sender of the mail a
> message.
Don't. The vast majority of spam and mal-mail use a forged From:
address. You'll be abusing innocent bystanders.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - Spammers! http://www.spots.ab.ca/~keeling/emails.html
http://www.ietf.org/rfc/rfc1855.txt
Re: procmail problem
am 26.02.2006 22:03:19 von Sebastian Deiszner
"s. keeling" schrieb im Newsbeitrag
news:slrne03u3p.tbo.keeling@infidel.spots.ab.ca...
> Sebastian Deiszner :
>>
>> I want to reject a mail and then i want to send the sender of the mail a
>> message.
>
> Don't. The vast majority of spam and mal-mail use a forged From:
> address. You'll be abusing innocent bystanders.
This is not spam, i want to reject.
Spam has never 200 Kb size.
I forward this account to my mobile phone - so i can't receive mails, bigger
than 200 Kb - because of the limited kapacity of my wireless connection.
How do I reject with an Mail "message is to big, please send messages bigger
than 200kb to ...@....de"?
thanx
Re: procmail problem
am 27.02.2006 00:26:50 von Garen Erdoisa
Sebastian Deiszner wrote:
> Hello,
>
> i want to reject a mail and then i want to send the sender of the mail a
> message.
>
> But the mail is not send - what could i do?
>
> thanx
>
>
>
> :0:
> * > 200000
> {
> echo "mail is to big - max 200 kilobytes" | mail $SENDER
> EXITCODE=77
> :0
> /dev/null
> }
>
>
You should not use procmail to do this since the message has already
been accepted by your MTA (Mailer Transport Agent) and handed off to the
MDA (Mailer Delivery Agent) in this case "procmail". If you accept an
email at the MTA level, then later on send a reject notice to the
apparent sender you'll most often just be sending email to a forged from
address because the sender lied to your SMTP daemon about who they are.
If the forged from address happens to be a real address, then you may
end up subjecting an innocent third party to your spam which can result
in your server being reported by that innocent third party as a spam
source which could end up with your server being listed on various
anti-spam block lists.
What you can do, is look for an option in your MTA to reject messages at
the SMTP transaction level if they are over a size limit you specify.
For example with sendmail this can be done by adding the sendmail
command line option MaxMessageSize=200000 to sendmail when your system
starts the daemon.
That way the size limit will be advertised on the ESMTP connection, and
will be checked again during message data collection. If the message
size is over limit the message will be directly rejected by sendmail.
Other MTA's should also have such an option. So if you are not using
sendmail you'll need to check the documentation of your MTA for this option.
If you don't have control of the SMTP daemon, then all you should do
with procmail is divert the oversize messages to a different mailbox
than your cell phone for later review.
You can do this with procmail thus:
# message under 200k, forward to cellphone
:0
* < 200000
! someaccount@cellphone.example.com
# message over 200k, forward to alternate account for later review
:0 E
! alternateaccount@example.net
# network issues or servers may be off-line, so deliver
# to local default inbox.
# You could use a pop or imap client to fetch this mailbox.
:0:
${DEFAULT}
Hope this helps
Garen
Re: procmail problem
am 27.02.2006 02:55:20 von Garen Erdoisa
Garen Erdoisa wrote:
> Sebastian Deiszner wrote:
>> Hello,
>>
>> i want to reject a mail and then i want to send the sender of the mail
>> a message.
>>
>> But the mail is not send - what could i do?
>>
>> thanx
>>
>>
>>
>> :0:
>> * > 200000
>> {
>> echo "mail is to big - max 200 kilobytes" | mail $SENDER
>> EXITCODE=77
>> :0
>> /dev/null
>> }
>>
>[snip]
>
> You can do this with procmail thus:
>
> # message under 200k, forward to cellphone
> :0
> * < 200000
> ! someaccount@cellphone.example.com
>
> # message over 200k, forward to alternate account for later review
> :0 E
> ! alternateaccount@example.net
>
> # network issues or servers may be off-line, so deliver
> # to local default inbox.
> # You could use a pop or imap client to fetch this mailbox.
> :0:
> ${DEFAULT}
>
>
> Hope this helps
> Garen
Another thought here would be to both forward the over sized email to an
alternate account, and also send a notice to your cellphone as a
reminder to check the other account when an over sized email event is
encountered. Personally I would think of this as very annoying, but the
following demonstrates a way to do it in procmail if that is what you
really want to do. :)
# define a logfile
LOGFILE=/home/${LOGNAME}/procmail.log
SENDMAIL='/usr/sbin/sendmail'
CELLPHONEEMAIL='someaccount@cellphone.example.com'
ALTERNATEEMAIL='alternateaccount@example.net'
# set a new line character to make procmail log entries look neater.
NL="
"
# message size is under 200000
:0
* < 200000
! ${CELLPHONEEMAIL}
# Else message size is 200000 or greater
:0 E
{
# Log the over sized email event in the procmail log file
LOG="[$$]$_: Over sized email, reminder notice sent to cellphone${NL}"
# mail a reminder notice to cellphone that an over sized email was
# received.
# For demonstration purposes, define a variable with the notice subject
# and message to send to the cell phone.
NOTICESUBJECT='Over sized email received'
# Note the back tics that launch an embedded shell script here:
LOG=` echo "${NOTICESUBJECT}." |mail -s "${NOTICESUBJECT}"
${CELLPHONEEMAIL} `
# forward the over sized email to the alternate account.
:0
! ${ALTERNATEEMAIL}
}
# Will only get to this point if the above recipes failed for some
# reason. Could be due to network outage, server being down, or the
# destination server is rejecting messages due to excess server load.
# Log the return code of the above recipe(s).
# code 139 = procmail broken pipe which is the most typical one you
# might see here.
RET=$?
# Since the above recipes failed to forward the email
# we'll deliver it to the local inbox for later retrieval
LOG="[$$]$_: Error: got return code ${RET} while attempting to forward
message. ${NL}"
LOG="[$$]$_: Message delivered to local default inbox.${NL}"
:0:
${DEFAULT}
Re: procmail problem
am 27.02.2006 03:48:03 von Alan Connor
On comp.mail.misc, in
, "s. keeling" wrote:
> Sebastian Deiszner :
>
>> I want to reject a mail and then i want to send the sender of
>> the mail a message.
>
> Don't. The vast majority of spam and mal-mail use a forged
> From: address. You'll be abusing innocent bystanders.
Not quite right. Most of the false return addresses on spam
are _not_ real people's addresses. Spammers know better than
to needlessly piss people off and take pains to make sure
the addresses are not in use, or not likely to be in use.
If you don't believe me, just sit down with a pile of randomly
collected spam and send a mail to each of them.
Odds are, they will all bounce.
But you are quite right to tell him not to do that. It's a
waste of time at best.
Known spam should be dumped. Period.
Auto-responses must be used with great discretion. The OP
can see:
http://home.earthlink.net/~alanconnor/elrav1/cr.html for
an overview of a properly-constructed auto-response filter
and useful links.
He will have to mail me if he has any questions. This
group is a schitthole.
If he isn't willing to exchange mail with me, then he is a
wanna-be spammer or a troll and that's fine. I don't help
either sorts if I can help it.
[Note: I don't read the posts of "Sam" or his numerous
sockpuppets or his 'friends', nor any responses to them.]
Let me guess: "Sam" will have another brain spasm when
he reads this and plead once again with his favorite cartoon
character to answer an alleged list of questions.
------------------------
From Keeling's sig:
"Any technology distinguishable from magic is insufficiently
advanced."
Please save us from all of the oblivious, semi-educated fools
who think that Father Science is going to invent a wondrous
machine, potion, or process that will solve all of the challengesof the human race.
They've been saying that for about 50 years now, and things just
keep getting worse. You'd think that the 'objective scientists'
would notice that.
But, unfortunately, they can't. The Corporations have them by
the balls: They need to come up with things that sell and
make jobs and investment incomes. The people that provide their
incomes and fancy machines and power and buildings are not
interested in anything else.
They absolutely do not want to hear that the planet doesn't need
any more industry, that the over-indulgence in and over-reliance
on technology is killing us.
But the True Believers like s. keeling don't want to hear that
either. They are not interested in things like facts.
They aren interested in solutions that don't require _them_
to do anything but exercise blind faith.
Alan
--
http://home.earthlink.net/~alanconnor/contact.html
Other URLs of possible interest in my headers.
Re: procmail problem
am 27.02.2006 04:40:24 von Sam
This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.
--=_mimegpg-commodore.email-scan.com-4118-1141011623-0001
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Usenet Beavis writes:
> If you don't believe me, just sit down with a pile of randomly
> collected spam and send a mail to each of them.
Beavis, don't you have anything better to do?
> Auto-responses must be used with great discretion. The OP
> can see:
>
> http://home.earthlink.net/~alanconnor/elrav1/cr.html for
> an overview of a properly-constructed auto-response filter
> and useful links.
See also http://www.pearlgates.net/nanae/kooks/ac/ for more information on
the Usenet Beavis.
> He will have to mail me if he has any questions. This
> group is a schitthole.
Beavis's mail filter works so well, that he no longer needs to munge his
address when posting to Usenet, isn't that amazing?
> If he isn't willing to exchange mail with me, then he is a
> wanna-be spammer or a troll and that's fine. I don't help
> either sorts if I can help it.
The entire world doesn't want to have anything to do with you.
The whole world is against you, Beavis.
> [Note: it's not my fault that I'm a complete dumbass. I was dropped on my
> head as a child. See http://www.pearlgates.net/nanae/kooks/ac/ for
> more information]
>
> Let me guess: "Sam" will have more fun at my expense.
Let me guess: Beavis will make another announcement, about his psychic news
reader that automatically deletes all posts that make fun of him.
====
FAQ: Canonical list of questions Beavis refuses to answer (V1.50)
This is a canonical list of questions that Beavis never answers. This FAQ is
posted on a semi-regular schedule, as circumstances warrant.
For more information on Beavis, see:
http://www.pearlgates.net/nanae/kooks/ac/
Although Beavis has been posting for a long time, he always remains silent
on the subjects enumerated below. His response, if any, usually consists of
replying to the parent post with a loud proclamation that his Usenet-reading
software runs a magical filter that automatically identifies anyone who's
making fun of him, and hides those offensive posts. For more information
see question #9 below.
============================================================ ================
1) If your Challenge-Response spam filter works so well, why are you munging
your address, when posting to Usenet?
2) If spammers avoid forging real E-mail addresses on spam, then where do
all these bounces everyone reports getting (for spam with their return
address was forged onto) come from?
3) If your Challenge-Response filter is so great, why do you still munge
when posting to Usenet?
4) Do you still believe that rsh is the best solution for remote access?
(http://tinyurl.com/5qqb6)
5) What is your evidence that everyone who disagrees with you, and thinks
that you're a moron, is a spammer?
6) How many different individuals do you believe really post to
comp.mail.misc? What is the evidence for your paranoid belief that everyone,
except you, who posts here is some unknown arch-nemesis of yours?
7) How many times, or how often, do you believe is necessary to announce
that you do not read someone's posts? What is your reason for making these
regularly-scheduled proclamations? Who do you believe is so interested in
keeping track of your Usenet-reading habits?
8) When was the last time you saw Bigfoot (http://tinyurl.com/23r3f)?
9) If your C-R system employs a spam filter so that it won't challenge spam,
then why does any of the mail that passes the filter, and is thusly presumed
not to be spam, need to be challenged?
10) You claim that the software you use to read Usenet magically identifies
any post that makes fun of you. In http://tinyurl.com/3swes you explain
that "What I get in my newsreader is a mock post with fake headers and no
body, except for the first parts of the Subject and From headers."
Since your headers indicate that you use slrn and, as far as anyone knows,
the stock slrn doesn't work that way, is this interesting patch to slrn
available for download anywhere?
11) You regularly post alleged logs of your procmail recipe autodeleting a
bunch of irrelevant mail that you've received. Why, and who exactly do you
believe is interested in your mail logs?
12) How exactly do you "enforce" an "order" to stay out of your mailbox,
supposedly (http://tinyurl.com/cs8jt)? Since you issue this "order" about
every week, or so, apparently nobody wants to follow it. What are you going
to do about it?
13) What's with your fascination with shit? (also http://tinyurl.com/cs8jt)?
14) You complain about some arch-nemesis of yours always posting forged
messages in your name. Can you come up with even a single URL, as an example
of what you're talking about?
15) You always complain about some mythical spammers that pretend to be
spamfighters (http://tinyurl.com/br4td). Who exactly are those people, and
can you post a copy of a spam that you supposedly received from them, that
proves that they're really spammers, and not spamfighters?
--=_mimegpg-commodore.email-scan.com-4118-1141011623-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
iD8DBQBEAnSnx9p3GYHlUOIRAsRwAJ9WEdmcdncAz5QPHdaIiV1j1z3swwCd G2HB
Y8IyslCKFZEkpXrdmdGOjII=
=DNEZ
-----END PGP SIGNATURE-----
--=_mimegpg-commodore.email-scan.com-4118-1141011623-0001--
Re: procmail problem
am 27.02.2006 05:30:37 von Mark Crispin
On Mon, 27 Feb 2006, Alan Connor wrote:
>> Don't. The vast majority of spam and mal-mail use a forged
>> From: address. You'll be abusing innocent bystanders.
> Not quite right. Most of the false return addresses on spam
> are _not_ real people's addresses. Spammers know better than
> to needlessly piss people off and take pains to make sure
> the addresses are not in use, or not likely to be in use.
Golly gee.
So the dozens of bounces that I receive every day must be hallucinations.
As are the messages that I get from myself, with an email address that I
last used in 1980.
As are the messages that I receive with From addresses belonging to
friends and colleagues, but with totally inappropriate IP addresses
Not to mention the particularly ghoulish ones that I get from people who
died years ago.
-- Mark --
http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
Re: procmail problem
am 27.02.2006 09:07:05 von Alan Connor
On comp.mail.misc, in , "Mark Crispin" wrote:
Killscored this undeservedly-arrogant academic snot a long
time ago.
(if he really is an academic -- he could be a janitor at the
school)
Talk to "Sam". You are both united by the fact that my
newsreader is a Snivelling-Punk-Free-Zone that doesn't
permit you to send articles to me via the Usenet.
[Note: I don't read the articles of "Sam" or his numerous
sockpuppets or his 'friends', nor any responses to them.]
Alan
--
http://home.earthlink.net/~alanconnor/contact.html
Other URLs of possible interest in my headers.
Re: procmail problem
am 27.02.2006 13:00:13 von Sam
This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.
--=_mimegpg-commodore.email-scan.com-4123-1141041607-0002
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Usenet Beavis writes:
> On comp.mail.misc, in , "Mark Crispin" wrote:
>
>
>
> Killscored this undeservedly-arrogant academic snot a long
> time ago.
Sure, Beavis.
> (if he really is an academic -- he could be a janitor at the
> school)
Or, you could be an escaped mental patient. That appears to be more likely,
though.
> Talk to "Sam". You are both united by the fact that my
> newsreader is a Snivelling-Punk-Free-Zone that doesn't
> permit you to send articles to me via the Usenet.
Free clue, Beavis. Usenet does not "send" you articles.
Ok, Beavis, please explain to the interested masses how you think Usenet
works.
This should be interesting.
> [Note: it's not my fault that I'm a complete dumbass. I was dropped on my
> head as a child. See http://www.pearlgates.net/nanae/kooks/ac/ for
> more information]
>
> Beavis
--=_mimegpg-commodore.email-scan.com-4123-1141041607-0002
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
iD8DBQBEAunIx9p3GYHlUOIRAvrhAJ9FQcHdnxoK22Xj0ntd6iltn9XSYACd EWS4
TEHUnlILejx55VoVYHRlRlA=
=lVhF
-----END PGP SIGNATURE-----
--=_mimegpg-commodore.email-scan.com-4123-1141041607-0002--
Re: procmail problem
am 27.02.2006 19:26:06 von Timo Salmi
Sebastian Deiszner wrote:
> i want to reject a mail and then i want to send the sender of the
> mail a message.
You may wish to take a look at
Timo's procmail email filtering tips and recipes
http://www.uwasa.fi/~ts/info/proctips.html
Foiling Spam with an Email Password System
http://www.uwasa.fi/~ts/info/spamfoil.html
You'll be observing a lot of messages flying around in this newsgroup
about the politics of procmail usage, especially between two feuding
regulars. I will not be touching that side of the inevitable
proceedings. The references above are about the techniques, not a
stand in the unending debate.
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:ts@uwasa.fi ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html
Re: procmail problem
am 27.02.2006 19:52:50 von Mark Crispin
On Mon, 27 Feb 2006, Sam wrote:
> Or, you could be an escaped mental patient. That appears to be more likely,
> though.
I understand the entertainment value of poking sticks at lunatics,
especially ones who go to lengths to be annoying. Nonetheless, we should
all express more tolerance and compassion towards the tragic victims of
the failed experiment of "mainstreaming". They deserve pity, not scorn.
The behavior is an attention-getting cry for help. We may not be able to
provide the needed help, but we don't need to be enablers for the behavior
either.
By all means, correct the egregious (and at times ludicrous) technical
fallacies. Gentleness and patience does not mean abandoning technical
standards.
-- Mark --
http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.