Email Servers | Brain Goo https://www.popmartian.com/tipsntricks Carpe Crap 'em Wed, 19 Jan 2011 20:01:19 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.10 How to update qmail relay rules https://www.popmartian.com/tipsntricks/2008/08/20/how-to-update-qmail-relay-rules/ https://www.popmartian.com/tipsntricks/2008/08/20/how-to-update-qmail-relay-rules/#respond Wed, 20 Aug 2008 15:31:05 +0000 http://www.popmartian.com/tipsntricks/?p=27 D. J. Bernstein’s Qmail, now in the public domain, is a powerful yet clumsy SMTP messaging system. One of the most common problems is updating the rules for allowing SMTP relay, or denying the same. If you qmail-smtpd under tcpserver, … Continue reading →

The post How to update qmail relay rules first appeared on Brain Goo.

]]>
D. J. Bernstein’s Qmail, now in the public domain, is a powerful yet clumsy SMTP messaging system. One of the most common problems is updating the rules for allowing SMTP relay, or denying the same.

If you qmail-smtpd under tcpserver, the following will update relay allow and relay forbid rules.

Create a file called /etc/tcp.smtp and put in it:

127.:allow,RELAYCLIENT=""
1.1.1.1:allow,RELAYCLIENT=""
2.2.:allow,RELAYCLIENT=""
2.2.2.5:deny

Qmail uses simple pattern matching so only classful subnets are allowed. Sorry, no CIDR notation.

The example above will allow/deny:

  • Allow relaying from 127.* your localhost subnet of 127.0.0.0/8
  • Allow the /32 address of 1.1.1.1
  • Allow 2.2.* the /16 subnet of 2.2.0.0/16
  • Specifically forbid 2.2.2.5

In order to implement these rules you need to update the server tcp.smpt.cbd file and restart Qmail.

First, back up /etc/tcp.smtp, then run the command:
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

If the rules don’t update, make sure -x /etc/tcp.smtp.cdb is after tcpserver in your start script, then restart Qmail.

Did you find this post useful or have questions or comments?  Please let me know!

The post How to update qmail relay rules first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2008/08/20/how-to-update-qmail-relay-rules/feed/ 0
RBLs with Exim4 (debian friendly) https://www.popmartian.com/tipsntricks/2008/01/11/rbls-with-exim4-debian-friendly/ https://www.popmartian.com/tipsntricks/2008/01/11/rbls-with-exim4-debian-friendly/#respond Fri, 11 Jan 2008 22:44:14 +0000 http://www.popmartian.com/tipsntricks/2008/01/11/rbls-with-exim4-debian-friendly/ Denying connections based on RBLs is a snap with Exim4. Most confusion is related to ACLs and where the definition sits. The fastest way to deny based on RBL is to add it to whatever ACL you specify in acl_smtp_rcpt … Continue reading →

The post RBLs with Exim4 (debian friendly) first appeared on Brain Goo.

]]>
Denying connections based on RBLs is a snap with Exim4. Most confusion is related to ACLs and where the definition sits.

The fastest way to deny based on RBL is to add it to whatever ACL you specify in acl_smtp_rcpt

However, you MUST put the declaration AFTER any relay allow definitions. ACLs are based on first-match which means they run in order and stop when they hit a match. Implicit allow.

Here is my ACL declared as acl_check_rcpt

acl_check_rcpt:
  accept  hosts = :
  deny    local_parts   = ^.*[@%!/|] : ^\\.   
  accept  local_parts   = postmaster
          domains       = +local_domains
  require verify        = sender
  deny    dnslists = zen.spamhaus.org
          message = Message rejected because $sender_fullhost is blacklisted at $dnslist_domain see $dnslist_text
  accept  domains       = +local_domains
          endpass
          message       = unknown user        
          verify        = recipient
  accept  domains       = +relay_to_domains
          endpass
          message       = unrouteable address
          verify        = recipient
  accept  hosts         = +relay_from_hosts               
  accept  authenticated = *
  deny    message       = relay not permitted

The RBL definition is toward the bottom, after we allow everyone in that we want in. This lets people relay via SMTP-AUTH or explicit allow before checking the RBL. If they aren’t allowed via anything we allow, then we check the RBL and die with a nice message.

Adverts:
The Exim SMTP Mail Server
Exim: The Mail Transfer Agent
The Exim SMTP Mail Server: Official Guide for Release 4
A Practical Guide to Linux(R) Commands, Editors, and Shell Programming
Understanding the Linux Kernel
Ubuntu Hacks: Tips & Tools for Exploring, Using, and Tuning Linux (Hacks)
Linux Pocket Guide

The post RBLs with Exim4 (debian friendly) first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2008/01/11/rbls-with-exim4-debian-friendly/feed/ 0
SMTP & POP3 Email for Virtual Users on Debian Sarge https://www.popmartian.com/tipsntricks/2007/07/31/smtp-pop3-email-for-virtual-users-on-debian-sarge/ https://www.popmartian.com/tipsntricks/2007/07/31/smtp-pop3-email-for-virtual-users-on-debian-sarge/#respond Tue, 31 Jul 2007 19:20:52 +0000 http://www.popmartian.com/tipsntricks/2007/07/31/smtp-pop3-email-for-virtual-users-on-debian-sarge/ How to set up virtual email domains and users with POP access on Debian Sarge http://www.randomsequence.com/articles/smtp-pop3-email-for-virtual-users-on-debian-sarge/ Adverts: The Exim SMTP Mail Server Exim: The Mail Transfer Agent The Exim SMTP Mail Server: Official Guide for Release 4

The post SMTP & POP3 Email for Virtual Users on Debian Sarge first appeared on Brain Goo.

]]>
How to set up virtual email domains and users with POP access on Debian Sarge

http://www.randomsequence.com/articles/smtp-pop3-email-for-virtual-users-on-debian-sarge/

Adverts:
The Exim SMTP Mail Server
Exim: The Mail Transfer Agent
The Exim SMTP Mail Server: Official Guide for Release 4

The post SMTP & POP3 Email for Virtual Users on Debian Sarge first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2007/07/31/smtp-pop3-email-for-virtual-users-on-debian-sarge/feed/ 0
Postfix Virtual Domain Hosting https://www.popmartian.com/tipsntricks/2007/07/31/postfix-virtual-domain-hosting/ https://www.popmartian.com/tipsntricks/2007/07/31/postfix-virtual-domain-hosting/#respond Tue, 31 Jul 2007 19:13:05 +0000 http://www.popmartian.com/tipsntricks/2007/07/31/postfix-virtual-domain-hosting/ How to set up virtual domain hosting in Postfix. http://www.postfix.org/VIRTUAL_README.html

The post Postfix Virtual Domain Hosting first appeared on Brain Goo.

]]>
How to set up virtual domain hosting in Postfix.

http://www.postfix.org/VIRTUAL_README.html

The post Postfix Virtual Domain Hosting first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2007/07/31/postfix-virtual-domain-hosting/feed/ 0
Qmail lacking features, view config https://www.popmartian.com/tipsntricks/2007/05/17/qmail-lacking-features-view-config/ https://www.popmartian.com/tipsntricks/2007/05/17/qmail-lacking-features-view-config/#respond Thu, 17 May 2007 18:10:07 +0000 http://www.popmartian.com/tipsntricks/2007/05/17/qmail-lacking-features-view-config/ /var/qmail/bin/qmail-showctl will show you the running config. Qmail does not allow you to restrict max recipients or max messages per session. I saw reference to a plugin to handle these controls, but do not know the name of it. You … Continue reading →

The post Qmail lacking features, view config first appeared on Brain Goo.

]]>
/var/qmail/bin/qmail-showctl will show you the running config.

Qmail does not allow you to restrict max recipients or max messages per session. I saw reference to a plugin to handle these controls, but do not know the name of it.

You can restrict max message size in /va/qmail/control/databytes

Example:

$ cat /var/qmail/control/databytes
10485760

That’s a 10MB limit

Adverts:
The qmail Handbook
qmail
Running qmail

The post Qmail lacking features, view config first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2007/05/17/qmail-lacking-features-view-config/feed/ 0
Qmail SMTP routes, single route https://www.popmartian.com/tipsntricks/2007/05/16/qmail-smtp-routes-single-route/ https://www.popmartian.com/tipsntricks/2007/05/16/qmail-smtp-routes-single-route/#respond Wed, 16 May 2007 19:29:44 +0000 http://www.popmartian.com/tipsntricks/2007/05/16/qmail-smtp-routes-single-route/ Qmail smtproutes can only handle one route per egress domain name. Example: example1.com:10.0.0.1 example1.com:10.0.0.2 Will send mail only to 10.0.0.1 The second entry will be ignored. You are better off using round-robin DNS or submitting a patch to handle priority … Continue reading →

The post Qmail SMTP routes, single route first appeared on Brain Goo.

]]>
Qmail smtproutes can only handle one route per egress domain name.

Example:

example1.com:10.0.0.1
example1.com:10.0.0.2

Will send mail only to 10.0.0.1 The second entry will be ignored.

You are better off using round-robin DNS or submitting a patch to handle priority routing.

Adverts:
The qmail Handbook
qmail
Running qmail

The post Qmail SMTP routes, single route first appeared on Brain Goo.

]]>
https://www.popmartian.com/tipsntricks/2007/05/16/qmail-smtp-routes-single-route/feed/ 0