Archive for the tag 'mail'

Removing a mail server from the Spamhaus PBL

How to check if your IP is listed.

http://www.spamhaus.org/lookup.lasso

Spamhaus assists Internet service providers with preventing unsolicited email (spam) from passing through their mail servers. One of the tools Spamhaus employs is a “Policy Block List” (PBL) that lists addresses that get assigned to customers of dial-up, broadband, and hosting service providers. Those addresses are then blocked by default and have to be manually removed from the list when someone has a legitimate need to use one of those addresses to run a mail server (as many Slicehost customers do). It is therefore likely that a new slice, or one that hasn’t been used as a mail server before, will be on the Spamhaus PBL.

Being on the PBL doesn’t mean your address is blocked for spamming. The list is only there as a precaution against potential abuse. Spamhaus applies this policy to any IP addresses that could change hands from one customer to another. Their goal is to prevent computers that should not be sending email directly from being able to do so if they are compromised in some way.

Prevention of infinite mail loop with Auto Responder

This mostly happens when the mail account using autoreponder gets lot of spam mail, and as many of these spam mails use bogus From addresses, this account also recieves many mailer-daemon responses while replying to these bogus email addresses.

1) Edit /home/virtual/FILESYSTEMTEMPLATE/sendmail/etc/smrsh/responder.sh (This file is hardlinked into all the domains having autoresponder enabled as
/home/virtual/[domainname]/etc/smrsh/responder.sh)

and comment out:

${PYTHONBIN} ${RUNAPP} $@ > /dev/null 2>&1

so it looks like:

# ${PYTHONBIN} ${RUNAPP} $@ > /dev/null 2>&1

Then insert after it:

procmail -a “$*” /etc/auto.rc

2) Create the file called auto.rc with the following lines:

:0
* ^FROM_MAILER
/dev/null
:0
| /usr/bin/python2 /usr/lib/opcenter/sendmail/responder.pyc $1

Copy this file to /home/virtual/[domainname]/etc/ for all the domains using autoresponder.
(You may want to use virtDomain.sh to automatically copy or create this file when ever a new domain is added)

Now anything coming from MAILER-DAEMON or postmaster that goes to the responder will be sent to /dev/null.

Anything else will be sent to the responder.

Reference: http://parallels.com

SBDavid

DirectAdmin Mail System Setup

Simple Rules to follow to setup a Mail System

Hostname must not match any domain that is being used on the system. Example, if you have a domain called domain.com and you want to recieve mail on user@domain.com, you must *not* set your hostname to domain.com. We recommend using server.domain.com instead. You must make sure that you add the A record for server.domain.com so that it resolves.

For DirectAdmin

- The hostname must be in the /etc/virtual/domains file.
- The hostname must *not* be in the /etc/virtual/domainowners file.
- The hostname must resolve. If not, add the required A records to the dns zone such that it does.
- The directory /etc/virtual/hostname must exist.. (eg: /etc/virtual/server.domain.com). It must not contain any files
- Any domains that you want to use for email (eg: domain.com) must be in both the /etc/virtual/domains file and the /etc/virtual/domainowners file. The directory /etc/virtual/domain.com must exist and the files /etc/virtual/domain.com/passwd and /etc/virtual/domain.com/aliases exist.

- File permissions for virtual pop inboxes should be (not applicable with Dovecot/Maildir):

/var/spool/virtual/domain.com 770 username:mail
/var/spool/virtual/domain.com/* 660 username:mail

- Make sure that your main server IP has a reverse lookup on it.

Repair and rebuild all mail configuration in plesk.

This can be done with Plesk mchk utility:

Login to the server as user root and run the mchk utility.

Example:

# /usr/local/psa/admin/sbin/mchk –with-spam

Also check for the options

# /usr/local/psa/admin/sbin/mchk –help

mchk [OPTION]

–without-spam - restore all settings except for SpamAssassin configuration
–with-spam - restore all settings
–spam-only - restore only SpamAssassin settings

This utility rebuilds in line with Plesk database Qmail control files in the /var/qmail/control, /var/qmail/users directories and mail users’ settings. Also, it sets proper ownership/permissions for all mailboxes (/var/qmail/mailnames/*).

SBDavid

Restoring Mail Configuration in Plesk

Restoring Mail Configuration in Plesk

Sometimes, Parallels Plesk Panel mail server configuration becomes corrupt and it is necessary to restore it. The restoration is carried out by internal mchk utility, intended for use by Parallels Plesk Panel.

However, as administrator, you can use it for restoring the Qmail and Courier-imap configuration when needed.

By default mchk is running in the background mode.

To execute it in the foreground, use the -v option. For example:

/usr/local/psa/admin/sbin/mchk -v

Reference : http://parallels.com/Plesk/

« Prev - Next »