How do I add an entry to 'Badmailfrom' file?
- Sign in as the root user to your server.
- Open the file "badmailfrom" for edition.
# cd /var/qmail/control/ # vi badmailfrom
- Enter the email id and/or domain name, mail from which need to be blocked.
SYNTAX: @domainname.com email@example.com
- Entries to be made in the 'badmailfrom' file.
To block mail from a domain @yahoo.com Adding the above line in the 'badmailfrom' file will block all the messages from the domain yahoo.com to your your server To block mail from a particular user. firstname.lastname@example.org Adding the above line in the 'badmailfrom' file will block all the messages from the user id email@example.com to your server
- Each entry should be on a new line.