Menu

HOWTOs_and_notes_for_specific_MTAs_and_OSes

Anonymous

[Microsoft_Exchange]

ASSP and OS/2

I had perl 5.8/OS2 installed and also i had wget and bzip2 and wget in my path. Also i created a file updatednsbl.cmd for periodic updates

wget http://spfilter.openrbl.org/data/output/DEFAULT.octets.bz2 --output-document=dns.bz2
if not exist dns goto cont
if exist dns.sav del dns.sav
ren dns dns.sav
:cont
bzip2 -d dns.bz2
perl dnsbl.pl dns

                            :

HOWTO: Post.Office

NT only: How do I change the SMTP Port 25 something else? That information is stored in the registry and can be modified for Post.Office. 1. As a local NT Administrator for that host, open the Registry Editor. 2. Within HKEY_LOCAL_MACHINE select: SOFTWARE -> Software.com -> post.office -> SMTP-Accept -> Config 3. Double-click on the "Socket" Key to edit it. 4. Change the value from 25 to 26 (for example) and click on OK. 5. If you do not have permission to save this value, you will need to: select the Security Menu Option -> Owner…-> Take Ownership; select the Security Menu Option again -> Permissions -> ; highlight your administrative self; select the Type of Access Pull Down and select Full Control; select OK; now try the edit the Socket Key. 6.You will now need to stop and start the Post.Office service in your Control Panel - Services Window.

                            :

HOWTO Change the SMTP port for Lotus Notes

For Release 4.6.1 or greater of IBM/Lotus Domino, you could add SMTPMTA_IPPORT=xxx to your notes.ini and change that way the SMTPMTA lisener port. After you have changed this value, you need to restart the SMTPMTA and the native Domino router. For Release 5 of IBM/Lotus Domino you need to change the Internet Ports in the Server document. See attachment Domino_R5_Server_Document.jpg or Domino_R5_Server_Document.png After you have changed this value in the Server document, you only need to restart the Domino router.

For Release 6 of IBM/Lotus Domino you need to change the Internet Ports in the Server document. See attachment Domino_R6_Server_Document.jpg or Domino_R6_Server_Document.png After you have changed this value in the Server document, you only need to restart the Domino router.

                            :

HOWTO: General instructions for any non-SMTP mail server (MS Exchange, Lotus Notes, etc)

I’m writing specific instructions for how to install ASSP with Microsoft Exchange, but the process is the same for other servers. You need to make some choices: Will ASSP run on the same box as Exchange? ASSP requires a second mail server to deliver internet mail; will you use your ISP’s mail relay host, or configure your own secondary mail server (in addition to Exchange)? If so, what server will you use?

I'll explain two ways to do this.

The first way works best with two servers. I’ll assume you have Exchange running on one server and that you run ASSP and qmail on a separate FreeBSD server. (You can use many other possibilities, but I’ll describe this setup. Actually Windows with Mercury will work equally well.) This setup looks like this:

Internet -> ASSP -> qmail -> exchange -> client and Client -> Exchange -> ASSP -> qmail -> Internet

Set up your FreeBSD server with perl and qmail. (see http://www.freebsd.org/ ) Make sure it’s working on the network. Edit /etc/services and change SMTP from 25 to 125. Create a group and user called assp. Install ASSP to the assp user’s home. (These are suggestions – do something else if you prefer.) Verify that qmail relays mail for 127.0.0.1. Configure any mail applications (web mail or local clients) to use SMTP for delivery and not sendmail.

Direct your DNS MX for Exchange’s domain to the ASSP / qmail box. Configure qmail to route mail for Exchange’s domain to Exchange’s IP. (Depending on your mail server this may be tricky. One option might be to put the Exchange's IP in the /etc/hosts or /winnt/services32/drivers/etc/hosts file associated with the mail host in your DNS MX.)

Configure ASSP this way: Listen Port = 25, SMTP Destination = 125, Accept All Mail = exchange server, 127.0.0.1 and whatever else you like.

Configure Exchange to route all Internet mail to the ASSP / qmail box.

That’s it. Please read the documentation to know how to set up your spam and notspam collections, prime the whitelist, rebuild your spamdb, customize ASSP’s configuration settings for your site, and more.

This is the more complicated, but more flexible way.

If you plan to run everything on one box and you’re not planning to use your ISP’s mail relay, you can use Mercury (see http://www.pmail.com) or even IIS’s SMTP service. Be sure you’re familiar with their configuration options and limitations.

Incoming mail will follow this path:

Internet Mail -> DNS MX record -> (port 25) ASSP -> Exchange -> Clients

Outgoing mail will follow this path:

Client -> Exchange (Smart host) -> (Relay port) ASSP -> ISP’s Mail Relay or Client -> Exchange (Smart host) -> (Relay port) ASSP -> local secondary SMTP

If ASSP and Exchange are on the same box, you need to move Exchange’s SMTP port. Different mail servers allow you to do this in different ways. You may find a configuration menu like Domino / Notes: Ports -> Internet Ports -> Mail -> SMTP Inbound. For Exchange you need to look in c:\winnt\system32\drivers\etc\services and edit the SMTP line so say 125 instead of 25. (You can use any port you want, but use ports consistently and be sure that your firewall protects ports appropriately.) Save the file (make sure your editor didn’t add a .txt). You may need to restart Exchange.

In the ASSP Configuration web page (http://127.0.0.1:55555/) put Exchange’s address in the SMTP Destination: 127.0.0.1:125 perhaps.

If ASSP and Exchange are on the same box put your public IP : 25 in the “Listen Port” box. For example, 220.1.2.3:25. Then put 127.0.0.2:25 in ASSP’s “Relay Port” and the address of your ISP’s mail relay or your secondary SMTP server in the “Relay Host.” For example: smtp.localhosting.com:25 or 127.0.0.1:325. Configure Exchange to route all Internet mail to 127.0.0.2.

If ASSP and Exchange are on separate boxes, you need to assign a second IP address (often called an alias) to the ASSP box. (If Exchange is on a private network and your ASSP box is on both the public and private networks, so it already has two addresses, you can skip this step.) Let’s assume you have given ASSP 220.1.2.3 and 220.1.2.4. Your Mail MX should point to 220.1.2.3, and ASSP should have 220.1.2.3:25 for its “Listen Port.” 220.1.2.4:25 should be the “Relay Port” and your firewall should block external connections to 220:1.2.4:25. Configure Exchange to route all Internet mail to 220:1.2.4.

Don’t forget to click submit on the ASSP configuration page to accept the changes.

If you are using a secondary SMTP server, configure it to listen on port 325. (You can use any port you want, but use ports consistently and be sure that your firewall protects ports appropriately.) Configure it to accept all connections/mail from ASSP for relaying, and disable any message size limitations.

See also the note on how to use the email interface with Exchange / Notes, etc at How do I use the email interface with Exchange, Notes, or a RelayHost / RelayPort setup? .

                            :

HOWTO: ASSP and TLS or secure SMTP.

TLS or Transport Layer Security is one method of securing SMTP connections. TLS was added in version 1.5.1 to the ASSP program.

                            :

HOWTO: Change the SMTP port in Courier-MTA?

Look in /etc/courier (maybe /usr/local/etc/courier) for a file esmtpd There should be a line PORT=smtp

Change that to

PORT=125

(or whatever port you like) Restart courier.

Randy writes: We're using courier-mta here on a bunch of machines and will be consolidating the SPAM analysis to a single point of entry to simplify and unify the data. During the process of setting up a machine (that acts as a firewall, i.e., two (2) nics) we found that courier happily binds to each nic for smtp listening.

Actually, it's documented to work that way and it does.

We had to get very specific with courier's etc/esmtpd file entry, using the following line:

PORT=127.0.0.1.125

..to convince it to really only listen to your ASSP proxy on the one nic (inside). Otherwise, courier would reject the socket bind attempt to 127.0.0.1:125 (Note: that courier's file uses 127.0.0.1.125 dotted only)

It took a short while to grok that courier was the culprit, and now it behaves way better.

We set up ASSP to be the real honest SMTP service for the machine; and it handles SMTP connections on both nics without incident.

Please, if you get a chance, update the FAQ thingy to add some words about telling courier to be very specific (if it makes sense to you) because this was really the only issue here - and it was very frustrating. Now, after the fact, it's pretty obvious - but, as you know, hindsight is..... and all that.

                            :

HOWTO: change the smtp port in sendmail

Edit Sendmail.cf Change

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA

to

O DaemonPortOptions=Port=125,Addr=127.0.0.1, Name=MTA

                            :

HOWTO: ASSP and Antivirus proxies

Generally it's best to put mail through ASSP before going to antivirus proxies. I'll post more on why later. I thought I would just give people a heads up in case I am not the only one who didn't think of it. If you use Norton Anti-virus for Exchange on your mail server and have recipient notification turned on, you will add the virus sender's email address to the whitelist every time you receive a virus, because NAV sends them a notification.

This is of course easily fixed by turning this feature off which is probably fine, with the types of viruses nowadays it probably isn't notifying the actual sender anyways. :-) Or you can add the NAVMSE email address to the redlist.

This caught me by surprise so I thought I would share it with the group. I am probably the only one who didn't think of this before now. But there you go anyways! :-)

Ged West

                            :

HOWTO: ASSP Mysql local domains

I am looking into using ASSP for our organization, and ran into a situation where I'm using Postfix/Mysql/Courier-Imap - Rather than using your config file to specify local domains, I needed to be able to query a table in a MySQL database.

If you are interested in offering a similar feature for that config entry or others, here is the diff output I used to patch the existing codebase for 1.0.3.

14a15,19

> #20031007 BLF
> #Note: Added Mysql local database query for domains
>
> my %cachedomain;
>

939a945,985

> #Added by BLF
> sub loaddatabase {
>         use DBI;
>         my $host = shift;
>         my $result;
>         my $count = keys %cachedomain;
>         if ($count > 10000) {
>                 %cachedomain = ();
>         }
>         if (!(exists $cachedomain{$host})) {
>                 my (%data) = (
>                         MySQL_Server => "localhost",
>                         MySQL_Username => "myusername",
>                         MySQL_Password => "mypassword",
>                         MySQL_Transport => "transport",
>                         MySQL_ServerDB => "postfix",
>                 );
>                 my $dbh =

DBI->connect("dbi:mysql:$data{MySQL_ServerDB}:$data{MySQL_Server}","$data{MySQL_Username}", "$data{MySQL_Password}", { AutoCommit => 1 }) || { $errorcode= $DBI::errstr };

>                 if ($errorcode) {
>                         return 0;
>                 }
>                 my $queryhost = $dbh->quote($host);
>                 my $sth = $dbh->prepare("SELECT domain FROM

$data{MySQL_Transport} where domain = $queryhost");

>                 $sth->execute;
>                 ($result) = $sth->fetchrow_array;
>         } else {
>                 return $cachedomain{$host};
>         }
>         if ($result eq $host) {
>                 $cachedomain{$host} = 1;
>                 return 1;
>         } else {
>                 $cachedomain{$host} = 0;
>                 return 0;
>         }
> }
>

944a991,994

>
> #Added by BLF
>  return 1 if &loaddatabase($h);
>

-- Brian Fields

                            :

HOWTO: ASSP & VPopMail PopBeforeSmtp

I have modified the PopB4SMTP subroutine of ASSP.PL in order that ASSP is now compatible with the "Pop before SMTP" implementation of VPOPMail (the virtual domain manager of Qmail). For those who are interested, here is the modified code:

sub ok2Relay {
 my $ip=shift;

 # If you want to allow pop before smtp uncomment this line and implement the PopB4SMTP sub below

 # This must be done first...

 return 1 if PopB4SMTP($ip);

 return 1 if $acceptAllMail && $ip=~/^($acceptAllMail)/i;

 if($relayHostFile) {
  check4update(relayHostFile);
  return 1 if $relayHostFile{$ip};
 }

 # failed all tests -- return 0
 0;

}

# if you want to allow pop before smtp authentication then umcomment the line above
# where this sub is called and edit this sub to be appropriate for your implementation

# It sequentially test the text file /users/vpopmail/etc/open-smtp
# maintained by vpopmail (Guy)

sub PopB4SMTP {
 my $ip=shift; my $s; my $cip;
 open(PBSMTP,"<PBSMTP>) {
    $s=index($_,":");
    if ($s != 0) {
      $cip=substr($_,0,$s);
      if ($cip eq $ip) {
        mlog(0,"PopB4SMTP OK for $ip");
        close(PBSMTP);
        return 1;
      }
    }
 }
 close(PBSMTP);
 mlog(0,"PopB4SMTP NOT OK for $ip");
 return 0;
}

Guy LOUIS Thanks for posting Guy. Here's one that works with Merak mail, but it may work with others unaltered because of how it works. My first Perl app, yay! sub PopB4SMTP {

return 0 unless $PopB4SMTPFile;
my $ip=shift;
my $ind; my $ipMatch; my $preByte; my $postByte;

       open(MKPOPSMTP,"<MKPOPSMTP>) {
               $ind = index($line,$ip);
                       if ($ind  != 0) {
                               #find the match, and get it and the char before and after
                               #if both of those aren't a number ord("0") & ord("9") 48 - 57 then I have the whole IP [ord is same as asc]
                               #if not, this is a subset of a larger IP address and thus no good
                               #ex: 66.35.250.203 I don't want to let 66.35.250.20 or 6.35.250.203 or 6.35.250.20 you get the idea

                               $preByte = ord(substr($line, ($ind - 1), 1));
                               $postByte = ord(substr($line, ($ind + length($ip)), 1)); #0 based, so no + 1

                               if ( (($preByte <MKPOPSMTP>) {
               $ind = index($line,$ip);
                       # Here was my bug. I had Not 0, which was true for -1;
                       # Well, that just goes to show you
                       if ($ind  > 0) {
                               #find the match, and get it and the char before and after
                               #if both of those aren't a number ord("0") & ord("9") 48 - 57 then I have the whole IP [ord is same as asc]
                               #if not, this is a subset of a larger IP address and thus no good
                               #ex: 66.35.250.203 I don't want to let 66.35.250.20 or 6.35.250.203 or 6.35.250.20 you get the idea
                               $preByte = ord(substr($line, ($ind - 1), 1));
                               $postByte = ord(substr($line, ($ind + length($ip)), 1)); #0 based, so no + 1

                               if ( (($preByte <tab> represents a tab character - tabs

are separators in sendmail)

HSubject:<tab>$>75<tab>Used to sheck for spam mail marked by ASSP
    Add a new rule set 75 (if this number is already in use, pick one that

isn't and use that both here and in the above H line

S75
RS*TRAPPEDSPAM$*<tab>$#discard $: discard

If you get this all correct, then emails identified by ASSP will have their headers marked with

Subject: [TRAPPEDSPAM] ...

Sendmail will see that in the subject and discard the mail!

Note that this setup does mean that all email presented to your server will be downloaded - for busy systems this may be too expensive in bandwith/server load, but it is perfect for us (about 1000 email per day including spam).

Mike

                            :

HOWTO: ASSP on Mitel SME (E-Smith)

Here is a link to a 4 page setup. It doesn't mention some file & directory permissions but it is enough to get you up and running. http://www.sonoracomm.com/sonoracomm/pdf/ASSP_HOWTO.pdf joe I've added a mirror here: http://assp.sourceforge.net/ASSP_SME_HOWTO.pdf...

                            :

HOWTO: automatically restart ASSP if it dies in *nix

  1. !/usr/pkg/bin/bash
    1. ASSP watchdog process.
  2. This should be run from ROOTs crontab.
  3. joehodge
    1. Start in the correct direcroty.
  4. cd /usr/local/assp-1.0.7

    1. Check for a running ASSP process.
  5. PROC=pgrep -f -U 10000 assp

    1. If ASSP is not running, start it.
  6. if [ "${PROC}" = "" ] then { echo "Restarting ASSP." ulimit -d unlimited perl assp.pl pwd } fi

                            :
    

HOWTO: NAV for Gateways, IIS SMTP -> Exchange

This explains how to setup ASSP for on Windows 2000 Server running Norton's Anti-Virus for Gateways with an a IIS SMTP Virtual Server forwarding to an internal Exchange 5.5 server.

                                                                          • The route my mail takes - Incoming Internet->ASSP(25)->Norton's Anti-Virus for Gateways(225)->SMTP Virtual Server(125)->Firewall->Exchange Server(25)->Clients

Outgoing Clients->Exchange Server(25)->Firewall->ASSP(25-2nd IP)->Norton's Anti-Virus for Gateways(225)->SMTP Virtual Server->Internet

                                                                                  • The SMTP Virtual Server - Assign 2 IP addresses to your Windows 2000 mail server. As an example I will be use private addresses:

192.168.0.1 This will be the address that ASSP listens on. It is also the address of the Default SMTP Virtual Server. 192.168.0.2 This will be the address of the relay port used by Exchange as a "smart host" to forward all outgoing mail to.

Install IIS. Open the Information Systems Manager. Right click on the Default SMTP Virtual Server and select Properties. Select the original IP address for your server. In our example this is 192.168.0.1. Click the Advanced button, then click the IP address in the list and click Edit. Change the port to 125. Click OK, then Apply and OK.

Right click on the Default SMTP Virtual Server and click New, and select Domain. In the "Create New Domain" Wizard choose "Remote" click next, type your local email domain domain.com (you don't need the @ symbol) then click ok.

In the left pane of the Information Systems Manager expand your Default SMTP Virtual Server, double click on the "Domains" folder, right click on your domain name and choose Properties. In the Properties choose "Allow all incoming mail to be relayed through this server." and select "route all incoming mail to this host" and type in the IP address of your Exchange Server(or the IP that answers for it on your firewall)and click ok.

Right click on the Virtual server and stop it.

Installing Norton anti-Virus for Gateways -

Double click on the NAVGW icon. Logon and click on the "Configure" button. Configure notification - Do NOT SEND NOTIFICATION TO SENDER! That will add spammers to your whitelist! Click save. Click on the SMTP Tab, set SMTP Port to 225 click save. Click on Relay tab, add 127.0.0.1 port 125 as the default relay host to route all mail to. That will send everything to the SMTP Virtual server after being scanned. Click save.

Setting up ASSP. Start ASSP.

Goto http://localhost:55555

Click "Show Advanced Configuration Options, scroll to the bottom and click Apply Changes. in the "SMTP Destination" enter the IP:port of NAVGW - 127.0.0.1:225

Add your local subnet to "Accept All Mail" - 192.168. Add your local Domains - i.e. domain.com

In the "Relay Host" enter the NAVGW port - 127.0.0.1:225 In "Relay Port" enter the 2rd address we created - 192.168.0.2:25.

Configure all other parameters as you see fit and click "apply changes".

Shut down ASSP.

On your Exchange Server, in the "Connections" tab of the IMS, choose "Forward all messages to Host:" and put 192.168.0.2 in the box.

Start the Virtual SMTP server.

Start ASSP.

Ged West

                            :

HOWTO Change the SMTP port for IMAIL

In versions before 7.10 you have to change the listening port for SMTP in the Windows Registry. 1: Run regedit 2:Go to HKEY_LOCAL_MACHINES/System/CurrentControlSet/Services/SMTPD32/Parameters 3:If you do not have a Value named "Port" on the right side, then you will need to create one. 4:Click on edit | New | DWORD value , name it "Port" and hit enter(exclude the " marks). 5:Double click on this new Port key and change the value to whatever port you want SMTP on. Set the port number as decimal rather than hexadecimal. 6:Stop and restart the SMTP service. Versions 7.10 and later you can change the SMTP port on the Advanced tab in the IMAIL Administrator | Localhost | Services | SMTP .

Hope this helps... Bill Somers bsomers

                            :

HOWTO: ASSP & Postfix

In /etc/postfix/master.cf, there is a line that says: smtp inet n - n - - smtpd

Change that to be: localhost:smtp inet n - n - - smtpd

Then restart postfix.

Then, tell assp to listen to <youripaddress>:25 and forward to localhost:25. pfudd

                            :

SIMS and ASSP on MacOS X HowTo

see http://www.maxlyth.com/whitepapers/SIMS_ASSP_HowTo/...

until Max feels like it's done. :-)

, ml

                            :

ASSP on Win32 Install

There's a great page at <http://www.andersonit.com/assp.html> to help get you going quickly on Windows with ASSP & Perl.


Related

Wiki: Microsoft_Exchange

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.