June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Categories

June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Qmail SMTP Access Control with tcp.smtp

Qmail SMTP Access Control with tcp.smtp

Before we can start using qmail smtpd service, we need to define some access control.

This can be done with file

/etc/tcp.smtp

To allow relaying from localhost, you have to add

127.:allow,RELAYCLIENT=””

This setting wil allow Qmail SMTP server to send email from any IP starting with 127.X.X.X

IP 127.0.0.1 is used by localhost

If you need to allow relay from IP address 200.200.200.100 and localhost, Add following

127.:allow,RELAYCLIENT=””
203.200.10.91:allow,RELAYCLIENT=””

Now you need to use tcprules command to add the rule to qmail database (/etc/tcp.smtp.cdb).

# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>