Reply to this topicStart new topicStart Poll

> Xmail Generates Bounce Messages
voigt
Posted: Jun 12 2008, 12:52 AM
Quote Post


Junior Member
**

Group: Members
Posts: 25
Member No.: 2942
Joined: 11-June 08



Here's what was working for me until I upgraded to 1.25 (note this probably has nothing to do with my problem with 1.25 and should work there too):
Create a postmaster account called for example postxmaster. Point all postmaster related server.tab entries at it. Create a null file called mailproc.tab in it's mail directory. No more bounce messages.

Why do this? Spammers send spam to my server to a non-existent user with a return address of the target spam victim. If you allow xmail to send out "message undeliverable notifications", the spammers spam will be delivered back to where xmail "thinks" it came from, thus spamming the faked from address.

If there's a better, easier way (filters are not easier and probably generate a lot of unnecessary overhead) I'd love to know. We really need a "never, ever send any postmaster mail off the local lan" flag in server.tab. As been mentioned elsewhere, spamcop will put you in banned lists if you bounce spammers messages for them. They have "honey pots" all over that look for postmaster messages.
PMEmail Poster
Top
pepsi
Posted: Jun 12 2008, 12:43 PM
Quote Post


Newbie
*

Group: Members
Posts: 8
Member No.: 2620
Joined: 30-July 07



Just a quistion beside.

at my work we use a mailrelay server. This server does during the handshake if the recipient mail address exists. If not the connection is closed. So the sending mailserver is responsible for sending the NDR.
In this way not my ip address is blacklisted but the server that is sending spam.

Is this an option for Xmailserver ?
PMEmail Poster
Top
hschneider
Posted: Jun 13 2008, 08:52 AM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



Voigt, pls forward this feature request direclty to Davidel at xmailserver.org.
Pepsi, this will fail when the recipient has catchall accounts ....


--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
voigt
Posted: Sep 11 2008, 12:31 PM
Quote Post


Junior Member
**

Group: Members
Posts: 25
Member No.: 2942
Joined: 11-June 08



Further research reveals the following: These e-mails (which originate from my mail server) are created by xmail with a null sender "<>". They are bounce messages. I cannot find any way to be rid of them. Maybe someone has an idea. (I have messaged Davide.)

My server (call it m1) acts as a secondary MX for another domain (m2). The other domain is running xmail 1.24.

domain m2 has the following users: u1, u2 and u3.

Spammer sends mail to fakeuser@m2 with a faked sender address of spamtarget@someotherdomain. This e-mail is sent to my server (m1).
My server attempts to relay it to m2 like a good secondary should. Unfortunately, m2 won't ever accept it because it has no user fakeuser@m2. Eventually m1 gives up trying to relay the message, applys a bounce message from <> to the front and "returns" it to the "sender" spamtarget@someotherdomain. So our clever spammers have found a way to relay their crap through my server.

I'd really like to stop this. I've temporarily removed my backup MX records for my friends domain. I hope there's some other way to fix this.

John

PMEmail Poster
Top
voigt
Posted: Sep 12 2008, 01:35 AM
Quote Post


Junior Member
**

Group: Members
Posts: 25
Member No.: 2942
Joined: 11-June 08



Here's Davide's reply:

Feed the backup MX with the proper accounts handled by the primary MX.
This is typically done by creating one cmdalias file for every account,
having an "smtprelay" line pointing to the real MTA.
This better be scripted, and done automatically, for your sake.
No, I don't have the scripts (since I have no need for them), and people
that wrote them were not willing to share them.



- Davide


I guess xmail's just not meant to be a reasonable secondary server.

John
PMEmail Poster
Top
Sob
Posted: Sep 12 2008, 08:23 PM
Quote Post


Member
***

Group: Members
Posts: 53
Member No.: 2881
Joined: 19-April 08



I tried the following and it seems to work just fine:

Primary server: mx1.example.net, XMail, Win32
Secondary server: mx2.example.net, XMail, Linux

Primary server has regular domain example.net with all accounts.
Secondary server has also regular domain example.net (not custom domain) but with no acccounts.

update-accounts.bat goes to primary server, update-accounts.php goes to secondary server.

To synchronize accounts, just to run update-accounts.bat is required.

It doesn't handle disabled acccounts. Getting the list of accounts from XMail would have to be modified for that.


update-accounts.bat:
CODE

CtrlClnt -s mx1.example.net -u ctrluser -p password -f users.txt "userlist"[TAB]"example.net"
CtrlClnt -s mx1.example.net -u ctrluser -p password -f aliases.txt "aliaslist"[TAB]"example.net"
pscp.exe -agent users.txt aliases.txt xmail@mx2.example.net:/tmp/
plink.exe -agent xmail@mx2.example.net update-accounts.php

Replace [TAB] by real tab.
pscp.exe and plink.exe are part of PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/)

update-accounts.php:
CODE

<?php
 $mailroot="/var/MailRoot"; #XMail root
 $dataroot="/tmp"; #where txts are uploaded
 $domain="example.net"; #domain name
 $relayto="mx1.example.net:25"; #where to relay mail to
 #----------------------------------------
 $accounts=Array();
 if($dh=opendir($mailroot.'/cmdaliases/'.$domain)) {
   while(($account=readdir($dh))!==false) {
     if(preg_match("/^([a-z0-9\-\.]+)\.tab$/", $account, $matches)) {
       $accounts[$matches[1]]=0;
     }
   }
   closedir($dh);
 }
 #
 foreach(Array('users.txt', 'aliases.txt') as $file) {
   $data=file($dataroot.'/'.$file);
   foreach($data as $line) {
     $tmp=explode("\t", $line);
     if($tmp[0]=="\"".$domain."\"") {
       $user=substr($tmp[1], 1, strlen($tmp[1])-2);
       $accounts[$user]=1;
     }
   }
 }
 #
 $tabfile="\"SMTPRELAY\"\t\"".$relayto."\"\n";
 foreach($accounts as $account=>$create) {
   $file=$mailroot.'/cmdaliases/'.$domain.'/'.$account.'.tab';
   if($create) {
     file_put_contents($file, $tabfile);
   } else {
     unlink($file);
   }
 }
?>
PMEmail Poster
Top
voigt
Posted: Sep 13 2008, 12:14 AM
Quote Post


Junior Member
**

Group: Members
Posts: 25
Member No.: 2942
Joined: 11-June 08



Hi:

I really appreciate you going to the trouble of writing those scripts and I hope they help someone. I can't really use them because I was acting as a secondary for 14 different domains (2 of whom also do secondary for domains that I host) and on top of being cumbersome, it's less secure than a simple custom domain. It also requires that additional control ports be opened in the firewall (or at least ssh ports for putty) which is not really an option I'd like to explore.

I'm looking at other solutions for the secondary servers that don't require knowledge of the individual accounts and yet won't relay spam.

Obviously, a "don't ever send e-mail from "<>" or postmaster" feature would solve my problem but I surely won't complain about something that Davide's given us for free. I suspect my situation is pretty unique anyway.

Thanks again,

John
PMEmail Poster
Top
RoxXxer
Posted: Sep 15 2015, 08:21 AM
Quote Post


Newbie
*

Group: Members
Posts: 5
Member No.: 26213
Joined: 1-June 15



I want to stop sending bounce mail to Postmaster. It should be sent only to the sender .How can I do that ?

sad.gif mellow.gif
PMEmail Poster
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | XMail Server | Next Newest »

Reply to this topicStart new topicStart Poll