Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-10 23:31:18

nemozob
Member
Registered: 2008-04-15
Posts: 36

How to send Textpattern mail through ISP requiring authentication

This is more of a PHP question but affects my ability to develop Textpattern sites locally.

I am running PHP and MySQL on my home machine using OS X 10.6. The problem is that I’m not able to send out any mail from Textpattern (adding users, contact forms, etc) and I assume this is because my ISP requires authentication. I have the authentication username/password/server information but I’m not sure what files I need to edit — sendmail or Postfix or what — to make this happen.

Does anyone have experience with this?

Offline

#2 2009-09-11 18:30:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: How to send Textpattern mail through ISP requiring authentication

If you are running Postfix as a local MTA, this might be what you need.

Offline

#3 2009-09-12 20:08:26

nemozob
Member
Registered: 2008-04-15
Posts: 36

Re: How to send Textpattern mail through ISP requiring authentication

Ruud, thanks for your response. I had actually found the instructions I needed elsewhere but the info you had pointed to was pretty close to what I needed.

Eventually I was able to figure it out and am posting in the hopes it helps someone else. I needed to add the authentication information to the postfix configuration file. This works for my ISP, AT&T, so you’ll need to supply your info as needed.

First I created a file in /etc/postfix called smtp_sasl_passwords. In that file I put the following, (substitute your own domain/email/password):

[smtp.domain.com]:587  myusername@domain.net:password

and in the Terminal, ran:

sudo postmap smtp_sasl_passwords

That command should create a 2nd file called smtp_sasl_passwords.db. I got some errors here so I made sure the owner/permissions of this file matched that of main.cf.

I then opened /etc/postfix/main.cf and added:

relayhost = [smtp.domain.com]:587
smtp_sasl_auth_enable = yes
smtp_tls_security_level = may
smtp_sasl_password_maps = hash:/etc/postfix/smtp_sasl_passwords
smtp_sasl_mechanism_filter = plain, login
smtp_sasl_security_options = noanonymous

Then, in the Terminal go to /etc/postfix/ and do:

sudo postfix reload

And test in the Terminal with:

printf "Subject: TestnHello" | sendmail -f username@domain.com username@domain.com

Last edited by nemozob (2009-09-13 17:32:16)

Offline

#4 2009-09-13 10:33:24

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: How to send Textpattern mail through ISP requiring authentication

“Oh – and thanks for your help too, Ruud…”


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

Board footer

Powered by FluxBB