Koozali.org formerly Contribs.org

How do I stop E-mail WBL Reject notice?

How do I stop E-mail WBL Reject notice?
« on: January 11, 2012, 04:13:35 PM »
I have one email in the configuration/E-mail WBL/reject/qmail badmailfrom list that I want to reject but do not want to sent a reject message to eg like the one below.

-----------------------------------------------
Sorry, we were unable to deliver your message to the following address.
<junkjunk@hotemail.com>:
Remote host said: 550 sorry, your envelope sender is in my badmailfrom list [RCPT_TO]

--- Below this line is a copy of the message.
.. etc etc
----------------------------------------------------
Is there a way to stop an email, but not have it sent a message to the email telling the sender that it was rejected. In other words just sent that email to null.

If I have to do it for all the badmailfrom mail I can do that if need be. Perhaps there is some other mechanism.  To do this? eg Spamassassin, but I dont think you can set up global rules in sme as we are only using SME for a mail relay.
« Last Edit: January 11, 2012, 09:51:09 PM by steve288 »

Re: How do I stop E-mail WBL Reject notice?
« Reply #1 on: January 12, 2012, 04:51:12 PM »
Well Im having conversation with myself but thats ok, I'm never lonely.
I deal with mail very little so I have to come up to speed on it every time.

I still  have not found a solution to my problem. (stop rejected email from going back to sender)

I could add the email address of the person into the reject list in the place I mentioned above.
Alternatively I can add a spamassassin blacklist to a file say 10_myrules in ...
    /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf#

put this in the file, 
   blacklist_from abcdbadperson@somedomain.com

or even a rule like
  header   LOCAL_DEMO2_FROM ALL =~ /abcdbadguy\@somedomain.com/i
  describe LOCAL_DEMO2_FROM Test looking for from
  score    LOCAL_DEMO2_FROM 100.1
run
 signal-event email-update

However in all cases the tests I have tried always sent out an email to the the address saying they have been rejected.
Spamassassin it seems does not have the ability to delete mail. All it can do is flag it or reject it. I think?
Unfotunetelly I think since Im using sme as to relay the mail, I recall from past experience that procmail (which is the normal way to delete mail) will not work globally. Since I think the mail is gone before it can be processed.

Am I right there? Does anyone see any other way to have rejected email or flagged spam deleted rather than rejected, back to sender.
Thanks.

Re: How do I stop E-mail WBL Reject notice?
« Reply #2 on: January 12, 2012, 05:14:22 PM »
Not quite sure if this is what ou want, but in Server Manager Configuraion-Email, set the Email to Unknown Users to something other than "reject" - ie send to administrator, or create a user "rubbish" and send to him (or her, or it!).

Re: How do I stop E-mail WBL Reject notice?
« Reply #3 on: January 12, 2012, 05:14:41 PM »
I still  have not found a solution to my problem. (stop rejected email from going back to sender)

If your server is receiving email messages, SMTP mail transport only gives you three options - "thanks, I've received the message", "no thanks, not now" or "no thanks, not ever". If your server sends the third status, then the sending "mail transport agent" will send the reject notice. Your server does not send that. If you wish to avoid the reject notice, your server has to receive the message, and then just silently delete it, rather than deliver it.

Re: How do I stop E-mail WBL Reject notice?
« Reply #4 on: January 12, 2012, 08:03:58 PM »
axessit
Yes I suppose a work around is to send it to another account, then I could set up procmail on that account and then delete it. That might be do-able.
Thanks.

CharlieBrady
What your saying if I understand you is that the Message Transfer Agent (smtp) basically either stops mail or transfers mail. And it has no ability to delete the mail. That this deletion must be done upstream at a mail server that actually recieves the mail. eg Exchange. Is that right?
Thanks.

Re: How do I stop E-mail WBL Reject notice?
« Reply #5 on: January 12, 2012, 08:16:15 PM »
I have one email in the configuration/E-mail WBL/reject/qmail badmailfrom list that I want to reject but do not want to sent a reject message to eg like the one below.

-----------------------------------------------
Sorry, we were unable to deliver your message to the following address.
<junkjunk@hotemail.com>:
Remote host said: 550 sorry, your envelope sender is in my badmailfrom list [RCPT_TO]

--- Below this line is a copy of the message.
.. etc etc

You are confusing us, and probably yourself, by not telling us the full story. You have an address in the badmailfrom list of one server, and are showing us a reject message generated by another server. The server with the badmailfrom list does not send a reject message - all it does is give a 550 response to an attempt to forward a message to it - 550 means  "no, not now, not ever, go away". The system which tried to send the message then generates the reject message and tries to send it back to the purported original sender.

Re: How do I stop E-mail WBL Reject notice?
« Reply #6 on: January 12, 2012, 08:23:48 PM »
What your saying if I understand you is that the Message Transfer Agent (smtp) basically either stops mail or transfers mail.

By 'stops', perhaps you mean "refuse to accept".  Yes, what you say is what MTAs usually do. But they can do other things - they can accept, then drop messages.

Quote
And it has no ability to delete the mail.

qpsmtpd and qmail in SME server do not delete any mail. But they could be configured to do so (using a new qpsmtpd plugin or a custom .qmail file, or procmail as you suggest).

Quote
That this deletion must be done upstream at a mail server that actually recieves the mail. eg Exchange. Is that right?

I don't know what you mean by 'upstream' and I don't know what Exchange has to do with it. Neither of the MTAs in your example are Exchange servers.

There are often multiple MTAs involved in the chain of delivery from sender to recipient and any in theory could divert or delete messages.

If you describe your configuration and your actual problem clearly, then someone might be able to provide a complete answer for you. I'm signing out on this issue now.

Re: How do I stop E-mail WBL Reject notice?
« Reply #7 on: January 12, 2012, 09:32:03 PM »
CB.

I don't know what you mean by 'upstream' and I don't know what Exchange has to do with it. Neither of the MTAs in your example are Exchange servers.
Thanks for helping to carry the ball to this point. Sorry for my Confusion.
What I ment by upstream in the context was that this SME server is being use to relay mail to an Exchange server. 
Regards

Re: How do I stop E-mail WBL Reject notice?
« Reply #8 on: January 13, 2012, 04:37:31 PM »
What I ment by upstream in the context was that this SME server is being use to relay mail to an Exchange server.

That doesn't match your report. Exchange servers don't have a badmailfrom file.

Offline Jáder

  • *
  • 1,059
    • LinuxFacil
Re: How do I stop E-mail WBL Reject notice?
« Reply #9 on: July 06, 2012, 02:28:57 AM »
Well Im having conversation with myself but thats ok, I'm never lonely.
I deal with mail very little so I have to come up to speed on it every time.

I still  have not found a solution to my problem. (stop rejected email from going back to sender)
(...)

I'd like to know if you found a way now... I'm having exactly same problem.
I have groups configurated and used as e-mail accounts (it's a must have feature) and spammers are sending e-mail with this groupname account as FROM... it's a shame ISP allow it ... I have a PERFECT SPF register! :(

I have SEVERAL returns a day... would be nice to search for "badmailfrom" on headers and delete... using ANY tool someone else could tell me how to configurate.

Regards.

Jáder
...

Re: How do I stop E-mail WBL Reject notice?
« Reply #10 on: July 10, 2012, 02:56:29 AM »
Firstly, I thought the spamassassin did this, if you set up the SPAM filtering in the email section of SM.

If that is not cleaning them up, you can install the mailsort contrib and set up the rules for message headers contains BADMAILFROM.