ClayRabbit
Verified User
MODERATOR'S NOTE:
This modification may make it impossible for scripts using SMTP connections for outgoing email to send email from your server. See the discussion below and use at your own risk.
I think it will be useful for everyone if following modifications will be applied to default exim.conf:
1. Change
to
127.0.0.1 should never be in relay_hosts, because there is no way to determine sender of messages submitted this way. So any your user can send tons of spam with his CGI over local connection to your SMTP (not via sendmail) and you can't even determine account of that spammer!
Then smtp_auth should be enabled in squirrelmail (in uebimiau it's already enabled by default AFAIK)
2. Change in authenticators configuration:
3. Add
4. In virtual_aliases: router change
Otherwise if we defined piped alias
(Not very elegance solution, maybe someone can advice better way.)
That's all for a while. What do you think about that?
This modification may make it impossible for scripts using SMTP connections for outgoing email to send email from your server. See the discussion below and use at your own risk.
I think it will be useful for everyone if following modifications will be applied to default exim.conf:
1. Change
Code:
hostlist relay_hosts = net-lsearch;/etc/virtual/pophosts : 127.0.0.1
Code:
hostlist relay_hosts = !127.0.0.1 : net-lsearch;/etc/virtual/pophosts
Then smtp_auth should be enabled in squirrelmail (in uebimiau it's already enabled by default AFAIK)
perl -pi -e "s/smtp_auth_mech = 'none'/smtp_auth_mech = 'login'/" /var/www/html/squirrelmail/config/config.php
2. Change in authenticators configuration:
toplain:
driver = plaintext
public_name = PLAIN
server_condition = "${perl{smtpauth}}"
server_set_id = $2
Without "server_prompts = :" PLAIN authentication will not work on some mail clients. For exaple with TheBat! (it's failed to auth via PLAIN and then sucessfuly authorized via LOGIN) and some MacOS client (i have forgotten it's name) where LOGIN method not supported.plain:
driver = plaintext
public_name = PLAIN
server_prompts = :
server_condition = "${perl{smtpauth}}"
server_set_id = $2
3. Add
afterheaders_add = "${if def:authenticated_id{X-Authenticated-Id: ${authenticated_id}}}"
This will help to track sender of message if it was submitted via SMTP with SMTP-authentication.remote_smtp:
driver = smtp
4. In virtual_aliases: router change
topipe_transport = virtual_address_pipe
and add "devnull" transportpipe_transport = devnull
to transports configuration.devnull:
driver = appendfile
file = /dev/null
Otherwise if we defined piped alias
then exim will deliver message to that program twice (first, with virtual_aliases_nostar: router, second with virtual_aliases.localpart: "|/path/to/program"
(Not very elegance solution, maybe someone can advice better way.)
That's all for a while. What do you think about that?
Last edited: