Yajie,
Based on Jason's notes, you would have to use:
smtp.gmail.com:587
instead of :
smtp.broadband.rogers.com:25
in all applicable places, since Rogers blocks all traffic to port 25
that tries to leave their network, to clamp down on spam bots.
For info on gmail access look here :
http://mail.google.com/support/bin/answer.py?hl=en&answer=13287
<http://mail.google.com/support/bin/answer.py?hl=en&answer=13287>
Mike
Yajie wrote:
One silly question since i haven't get into Postfix yet. Does it work with
google smtp,at all? It seems to support SSL.
Yajie
On Thu, Feb 4, 2010 at 12:39 PM, Jason Rose <[email protected]> wrote:
You can also follow the steps I provided to allow mail to appear to come
from a different domain (so long as you can verify ownership).
________________________________
From: Douglas Pickett <[email protected]>
To: David Cook <[email protected]>; Henry Coleman <
[email protected]>; TAUG Technical <[email protected]>
Sent: Thu, February 4, 2010 11:51:06 AM
Subject: Re: [on-asterisk] Postfix with Rogers
David, Henry,
I tried the suggestions that David made for postfix, but I found I was
still
getting messages rejected by Rogers. With what David suggested, and a
little more digging, it is now working for me on my test system.
Here's what worked for me (which only requires that you have a rogers.com
email account) on a Trixbox with Postfix 2.3. I'd already made the changes
on the Trixbox through it's usual interface to select Postfix as the MTA,
and enter the username/password stuff.
As suggested by David, you'll need to create an entry into the
sasl_password
file like:
smtp.broadband.rogers.com:25 [email protected]:XXXXXXXXXX
It is my understanding that smtp.broadband.rogers.com should be valid
regardless of location (well, as long as you're using Rogers as your ISP).
I've also changed my email address and password, for obvious reasons.
Most of my main.cf is the default, and consistent with David's example -
here's the customized bits at the end:
relayhost = smtp.broadband.rogers.com:25
ignore_mx_lookup_error = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_security_options =
smtp_use_tls = yes
smtp_generic_maps = hash:/etc/postfix/generic
The key additions that I had to make over what David suggested are the
"ignore_mx_lookup_error = yes" and the "smtp_generic_maps =
hash:/etc/postfix/generic".
The ignore_mx_lookup_error is needed because the MX record for Rogers is a
little screwy - I got a message "warning: malformed domain name in resource
data of MX record for smtp-rog.mail.yahoo.com:". This message also
occured
with the relayhost value that David suggested. This basically allows
Postfix to use the A record value, rather than the MX record that it
doesn't
like.
This got me to the point where Rogers would accept the mail connection, but
would then reject the email because it didn't like the "From". The mail
was
being sent using the hostname of the box - in my case
"trixbox1.localdomain" - so something from root would end up as having a
sender of [email protected]. This doesn't resolve when the mail
servers at Rogers/Yahoo try to look it up, so it was rejected.
That is where "smtp_generic_maps = hash:/etc/postfix/generic" come in -
this
was based upon suggestions from http://www.postfix.org/SOHO_README.html
Adding that line to main.cf, and putting the following line in the generic
file:
@trixbox1.localdomain [email protected]
means that the "From" address now becomes my email account. After making
the change, the SOHO doc advises to execute the command "postmap
/etc/postfix/generic"
When I send email as root, and look at the received message source, you'll
see:
From: "root" <[email protected]>
Depending on your email client, you'll see the sender as "root", but
Rogers
and Blackberry will see the "From" as something that exists.
After you've made all those changes, to make sure that postfix is using
them, I like to do a "sh /etc/init.d/postfix stop" and then a "sh
/etc/init.d/postfix start". I'm never sure which options are read only at
startup time, and which are dynamic, so this is a safe move.
For others to use this example, you'll need to put your information into
the
sasl_password file, and update the entry in the "generic" file to reflect
the name of your system (see what the "hostname" command returns on your
system).
Regards,
Doug.
----- Original Message -----
From: "David Cook" <[email protected]>
To: "'Henry Coleman'" <[email protected]>; "'TAUG Technical'"
<[email protected]>
Sent: Wednesday, February 03, 2010 9:03 PM
Subject: RE: [on-asterisk] Postfix with Rogers
Ok, here is a postfix one.....
Hey,
here is a copy of my main.cf. You'll have to replace the relayhost with
the phub for your area, and add the allowed networks into the mynetworks
field.
You also have to add your info to /etc/postfix/sasl_passwd.
Good luck!
sasl_passwd:
smtp.flfrd.phub.net.cable.rogers.com Rogers_Username:Rogers_Password
main.cf:
# see /usr/share/postfix/main.cf.dist for a commented, fuller
# version of this file.
# Do not change these directory settings - they are critical to Postfix
# operation.
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix
setgid_group = postdrop
# appending .domain is the MUA's job.
append_dot_mydomain = no
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# Uncomment the next line to generate delayed mail warnings
#delay_warning_time = 4h
myhostname = erika
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = erika.megatokyo.home, erika, localhost.localdomain,
localhost
relayhost = smtp.flfrd.phub.net.cable.rogers.com
mynetworks = 127.0.0.0/8,192.168.2.0/24
#mailbox_command = procmail -a "$EXTENSION"
mailbox_command = /usr/bin/procmail -Y -a $DOMAIN
mailbox_size_limit = 0
recipient_delimiter =
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
- dbc.
From: Henry Coleman [mailto:[email protected]]
Sent: February-03-10 8:32 PM
To: TAUG Technical
Subject: [on-asterisk] Postfix with Rogers
Hi all, before I lose all my hair, can anybody help me get my email up
and
running on an asterisk (Freepbx) system ?
I removed Sendmail and replaced it with Postfix because it's easier to
configure.
(Email is a mystery to me).
Rogers is blocking the SMTP port (25) so I can't directly SMTP using
their
server.
Do I need to use a relay and can I use my existing email account hosted
with
Google?
The Asterisk box uses a Dynamic domain address (i.e.mydomain.dyndns.biz)
All I need to do is send email with the attached vmail files why is it so
difficult to configure?
--
Henry Coleman
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Mike Ashton
CTO
Quality Track Intl
Ph: 647-724-3500 x 301
Cell: 416-527-4995
QTI CONFIDENTIAL AND PROPRIETARY INFORMATION
The contents of this material are confidential and proprietary to Quality Track
International, Inc.
and may not be reproduced, disclosed, distributed or used without the express
permission of an authorized representative of QTI.
Use for any purpose or in any manner other than that expressly authorized is
prohibited.
If you have received this communication in error, please immediately delete it
and all copies, and promptly notify the sender.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]