Topic: Alias Domain Open Relay problem
==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL 1.6.0
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue:
====
In a new installation I notice that if any spammer, fake "MAIL FROM:" command to a valid alias domain account it can relay mail without been authenticated.
A valid reject if try to relay with a domain account:
**************************************************************
Resolving hostname...
Connecting...
SMTP -> FROM SERVER:
220 mail01.domain.tld (Postfix). All Spam Is Reported. ESMTP
SMTP -> FROM SERVER:
250-mail01.domain.tld
250-PIPELINING
250-SIZE 15728640
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM: postmaster@domain.tld
SMTP -> FROM SERVER:
250 2.1.0 Ok
RCPT TO: postmaster@domain.tld
SMTP -> FROM SERVER:
553 5.7.1 : Sender address rejected: not logged in
SMTP -> ERROR: RCPT not accepted from server: 553 5.7.1 : Sender address rejected: not logged in
Message sending failed. ################# PERFECT... It's ok
**************************************************************
The problem when spammer use an alias domain in MAIL FROM: command
************************************************************
Resolving hostname...
Connecting...
SMTP -> FROM SERVER:
220 mail01.domain.tld (Postfix). All Spam Is Reported. ESMTP
SMTP -> FROM SERVER:
250-mail01.domain.tld
250-PIPELINING
250-SIZE 15728640
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM: any_valid_user@domain-alias.tld
SMTP -> FROM SERVER:
250 2.1.0 Ok
RCPT TO: another_valid_user@domain.tld # Or domain-alias.tld
SMTP -> FROM SERVER:
250 2.1.5 Ok
Sending Mail Message Body...
SMTP -> FROM SERVER:
354 End data with .
SMTP -> FROM SERVER:
250 2.0.0 Ok: queued as A897B1340DBD
Message completed successfully. ################# Houston, we've had a problem!!!
************************************************************
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.