
Email to FAX Guide
-
make sure that your desired domain's MX records are properly configured for email2fax server. verify using following command
# nslookup –type=mx example.com -
install sendmail service and enable sendmail service at startup.
-
enable sendmail to listen on public ip address look for following line in /etc/mail/sendmail.mc
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnland change line mentioned above into
DAEMON_OPTIONS(`Port=smtp, Addr=0.0.0.0, Name=MTA')dnl -
apply changes
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf -
Add asterisk to list of trusted user
echo "asterisk" >> /etc/mail/trusted-users -
Add your domain name in allowed local domain list to let sendmail receive mails for that domain
echo "FAX_DOMAIN.TLD" >> /etc/mail/local-host-names -
Route all mails for none-existing addresses into asterisk mailbox so we can receive emails for addresses like xyz_number@FAX_DOMAIN.TLD
echo '@FAX_DOMAIN.TLD asterisk' >> /etc/mail/virtusertable
makemap hash /etc/mail/virtusertable -
grant proper permission to apache user (asterisk) on mail folder
chmod +t /var/spool/mail -
restart sendmail service so changes can take affect
service sendmail restart -
login at ictfax web interface as admin
-
goto administrator => mailhandler => Add Mailbox and set following fields
E-mail address: fax@FAX_DOMAIN.TLD
Folder: /var/spool/mail/asterisk
POP3 or IMAP Mailbox: IMAP
Mailbox domain: *** must be empty ***
Security: Require password
Default commands: type: fax
Delete messages after they are processed?: TICK / Yes
Cron processing: Enabled -
setup cronjob so incoming email can be processed after every 5 minutes
echo 'MAILTO=""' > /tmp/asterisk_cron.txt
echo "*/5 * * * * wget -O /dev/null 'http://FAX_DOMAIN.TLD/cron.php' 2>/dev/null" >> /tmp/asterisk_cron.txt
crontab -u asterisk -l >> /tmp/asterisk_cron.txt
crontab -u asterisk /tmp/asterisk_cron.txtNOTE: make sure that /etc/hosts.allow is properly configured for accepting mails, and
smtp port (25) is not blocked by firewall. if so Add following line to
/etc/sysconfig/iptables above the last reject/drop rule:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
