Jump to content

Getting postfix working on debian linux


s0c0

Recommended Posts

I'm running debian etch using postfix as my SMTP server.  I am able to send via my PHP code with the following snippet:

 

function sendMail($to, $from, $subject, $msg)
{
	$headers = 'FROM: '.$from."\r\n";

	mail($to, $subject, $msg, $headers);

	return true;
}

 

But when I try sending from a mail client such as thunderbird or via telnet it does not allow me.  Authentication fails on thunderbird, and in telnet I get the following error:

 

221 2.7.0 Error: I can break rules, too. Goodbye.

Connection closed by foreign host.

 

Here is what my /etc/postfix/main.cf file looks like:

 

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

 

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)

biff = no

 

# appending .domain is the MUA's job.

append_dot_mydomain = no

 

# Uncomment the next line to generate "delayed mail" warnings

#delay_warning_time = 4h

 

myhostname = linux.mydoman.com

mydomain = mydomain.com

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

myorigin = $mydomain

mydestination = $mydomain, localhost, localhost.$mydomain

relayhost =

mynetworks = 127.0.0.0/8

mailbox_command = procmail -a "$EXTENSION"

mailbox_size_limit = 0

recipient_delimiter = +

inet_interfaces = all

 

# Authentication 5-6-07

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = $mydomain

smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated, reject_unauth_destination

smtpd_sasl_security_options = noanonymous

 

There error logs don't give me much to go on either, and yes, this particular server is running on a residential comcast cable connection.

Link to comment
Share on other sites

"Authentication fails on thunderbird"

 

Is this with thunderbird on the same linux machine?

 

At a best guess:

221 2.7.0 Error: I can break rules, too. Goodbye.

Connection closed by foreign host.

means that you dont have a FQDN for your server. You need to have a full - client1.mydomain.com

 

-steve

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.