View Single Post
Old 23rd July 2007, 15:24
bidevi bidevi is offline
Join Date: Jun 2007
Posts: 60
Thanks: 3
Thanked 2 Times in 2 Posts
Default Another try

During my experiments to get to know Debian and ISPConfig I always login as root. If something goes really wrong, I just reinstall the OS.

In Terminal:
# which sendmail

No luck: that's what is in my cgi script already.

I'll describe the working situation first.


Let's assume you own domain Let's also assume that your ISP's outgoing mail server uses this smtp code:, and your email address is
user name: blahusername
password: blahpassword

Say you need an smtp server to send email through mail forms on your web page, hosted on your own server at home. If you want to use your ISP's smtp server you can do this with the help of smarthost.

The following configuration works flawlessly in Fedora Core 6 (FC6) with Sendmail:

In /etc/mail/ add these lines:

dnl MASQUERADE_AS('your.domain')dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl

These lines have to be modified to look like:

dnl MASQUERADE_AS('')dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl

In order to authenticate to the email server of your ISP make sure to have the following line in the file /etc/mail/

FEATURE(`authinfo', `hash /etc/mail/authinfo')

and create this file:


with this inside:

AuthInfo:your.smtp.server "U:user@your.smtp.server" "I:user" "P: passwd" "M:LOGIN PLAIN"

where you modify this line to look like this: "" "I:blahusername" "P:blahpassword" "M:LOGIN PLAIN"

Now generate the file using this command:
make -C /etc/mail

Create a file named: /etc/mail/genericstable
with this inside it: root
(do not replace with your own data)

Execute this:
makemap hash /etc/mail/genericstable < /etc/mail/genericstable

and run:

makemap hash /etc/mail/authinfo < /etc/mail/authinfo

and make authinfo readable only by root:
chmod 600 /etc/mail/authinfo

This did it for me. I can send emails using my ISP's outgoing mail server with my FC6 server.


I have not been able, so far, to find instructions on the web how to configure Postfix in the same manner as Sendmail. Alright, I have modified a line in /etc/postfix/ to look like: relayhost =, but my web form didn't execute anything besides telling me the mail was sent, which wasn't the case.

I'm not amazed that it doesn't work because no authentication method was set up.

Any suggestions how to get it working for Postfix?
Reply With Quote