0

I am having trouble configuring my mail server (Dovecot and Postfix). The problem is that someone can send spam mails to my address from my own mail server. The server is not open-relay but it seems to be half-open.

Example:

[email protected]
[email protected]

Bad Guy sends spam from:
[email protected] to [email protected]

OR from
[email protected] to [email protected]

without needing any password.

Sending spam to others is not possible. I tried sending a mail to my own domain from my own domain via Telnet and it was possible without password. How can I prevent this?

3

1 Answer 1

0

1) Enable mail loging in /etc/rsyslog.conf

mail.*;mail.debug                                               -/var/log/maillog

service rsyslog restart

2) Try to find out how these messages are taken by postfix

3) add correct rules to main.cf

something like this:

smtpd_relay_restrictions = permit_sasl_authenticated,
        check_recipient_access hash:/etc/postfix/accept_my_domains,
        check_recipient_access hash:/etc/postfix/access,
        check_recipient_access hash:/etc/postfix/block_recipient,
        check_helo_access hash:/etc/postfix/check_hello,
        reject_unknown_recipient_domain,
        reject_unauth_destination,
        reject_invalid_hostname,
        reject_unauth_pipelining,
        reject_non_fqdn_recipient,
        reject_unverified_recipient,
        permit_auth_destination,
        reject
1
  • I don't think it's a matter of looking at logs, it's a matter of understanding the first comment
    – Sum1sAdmin
    May 17, 2016 at 8:24

You must log in to answer this question.