setup for personal computer, no domain, smarthost

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

setup for personal computer, no domain, smarthost

reader
Summary:
Setup postfix for single user home machine.
Receive mail for single user
Send out mail from single user (Thru smarthost)
(I do have credentials for a few online smtp servers)

Details:
Setup: Newish install of ubuntu-26 (still making settings etc)

I'm a long time sendmail user but recently have not been able to get
it working... as has happened many times, something has changed
somewhere in the chain and my setup no longer works.

After being told many times to ditch sendmail and use postfix ...
I'm only starting to try to understand postfix but my situation is:

Single user home machine on home lan.
No real domain (my ISP is comcast but does not offer Static IP for its
users .. or any kind of personal domain name)

I want to be able to pull mail from various pop3 and imap accounts.
Probably with fetchmail (I've used for many years)
AND be able to send mail out thru a smarthost, also done for many
years but it is becoming increasingly difficult to setup.

Smarthost is probabably smtp.newsguy.com.  That is what I've been
using for some time, and I have a very old account with them for
pop3.

With sendmail:
I used the smarthost method by masquerading as newsguy.
Not sure how to do it with postfix. Or if something
else entirely is needed.
 

----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

Marat Khalili
On 05/08/17 17:05, [hidden email] wrote:
> Details:
> Setup: Newish install of ubuntu-26 (still making settings etc)
Not sure what ubuntu-26 is, but I'm using smarthost configuration in
Ubuntu. Local gurus can advice on installing from source, but it is not
necessary.

> I want to be able to pull mail from various pop3 and imap accounts.
> Probably with fetchmail (I've used for many years)
Nothing to do with postfix.

> With sendmail:
> I used the smarthost method by masquerading as newsguy.
> Not sure how to do it with postfix. Or if something
> else entirely is needed.
Ubuntu has interactive installer for package postfix that allows you to
create smarthost configuration. Did you try it? The only thing you may
need tweaking is authentication. Read about smtp_sasl_auth_enable,
smtp_sasl_security_options and smtp_sasl_password_maps . As soon as you
get it working, ramp up the encryption using smtp_tls_*

--

With Best Regards,
Marat Khalili
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

Richard-2
In reply to this post by reader


> Date: Saturday, August 05, 2017 07:05:22 -0700
> From: [hidden email]
>
> Single user home machine on home lan.
> No real domain (my ISP is comcast but does not offer Static IP for
> its users .. or any kind of personal domain name).
>
> I want to be able to pull mail from various pop3 and imap accounts.
> Probably with fetchmail (I've used for many years)
> AND be able to send mail out thru a smarthost, also done for many
> years but it is becoming increasingly difficult to setup.

Generally port 25 is blocked (both directions) on Comcast dynamic IP
assignments. So, to send mail you'll likely need to configure your
MTA (postfix or sendmail) to use port 587/starttls (with
authentication) to send mail via your account on your mail provider's
server (or simply have your MUA do that and not bother with an MTA).

Comcast does offer a business-grade service that includes static IP
assignment and port 25 access.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

Wietse Venema
In reply to this post by reader
[hidden email]:
> Single user home machine on home lan.
> No real domain (my ISP is comcast but does not offer Static IP for its
> users .. or any kind of personal domain name)

/etc/postfix/main.cf:
    myhostname = localhost.localdomain
    myorigin = localhost.localdomain

See http://www.postfix.org/BASIC_CONFIGURATION_README.html

> I want to be able to pull mail from various pop3 and imap accounts.
> Probably with fetchmail (I've used for many years)
> AND be able to send mail out thru a smarthost, also done for many
> years but it is becoming increasingly difficult to setup.

There must be lots of writeups for fetchmail doing this.

> Smarthost is probabably smtp.newsguy.com.  That is what I've been
> using for some time, and I have a very old account with them for
> pop3.

/etc/postfix/main.cf:
    # Include the [] to suppress MS lookups.
    relayhost = [smtp.newsguy.com]

> With sendmail:
> I used the smarthost method by masquerading as newsguy.

See http://www.postfix.org/STANDARD_CONFIGURATION_README.html#fantasy
This has examples to map [hidden email] to your ISP account.

        Wietse
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

Wietse Venema
Wietse Venema:

> [hidden email]:
> > Single user home machine on home lan.
> > No real domain (my ISP is comcast but does not offer Static IP for its
> > users .. or any kind of personal domain name)
>
> /etc/postfix/main.cf:
>     myhostname = localhost.localdomain
>     myorigin = localhost.localdomain
>
> See http://www.postfix.org/BASIC_CONFIGURATION_README.html
>
> > I want to be able to pull mail from various pop3 and imap accounts.
> > Probably with fetchmail (I've used for many years)
> > AND be able to send mail out thru a smarthost, also done for many
> > years but it is becoming increasingly difficult to setup.
>
> There must be lots of writeups for fetchmail doing this.
>
> > Smarthost is probabably smtp.newsguy.com.  That is what I've been
> > using for some time, and I have a very old account with them for
> > pop3.
>
> /etc/postfix/main.cf:
>     # Include the [] to suppress MS lookups.
>     relayhost = [smtp.newsguy.com]

I forgot about authentication.

    relayhost = [smtp.newsguy.com]:587

See http://www.postfix.org/SOHO_README.html for this and other
information of interest.

        Wietse
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

reader
In reply to this post by reader
Sorry about the delay, I tried to reply on:
   gmane.mail.postfix.user but never say my replies appear so
now trying to reply thru the mailing list.

Marat Khalili <[hidden email]> writes:

> On 05/08/17 17:05, [hidden email] wrote:
>> Details:
>> Setup: Newish install of ubuntu-26 (still making settings etc)

Marat K wrote:
> Not sure what ubuntu-26 is, but I'm using smarthost configuration in
> Ubuntu. Local gurus can advice on installing from source, but it is
> not necessary.

A dopey typo... looking at something else... should be: ubuntu-17.04

Harry wrote
>> I want to be able to pull mail from various pop3 and imap accounts.
>> Probably with fetchmail (I've used for many years)

Marat K wrote:
> Nothing to do with postfix.

Well that's good news.

When I used sendmail, fetchmail would pass incoming mail to port25 for
sendmail to deliver. I don't know how postfix works but I thought it might be
the same way when used with fetchmail.

Harry wrote:
>> With sendmail I used the smarthost method by masquerading as newsguy.
>> Not sure how to do it with postfix. Or if something
>> else entirely is needed.

Ubuntu has interactive installer for package postfix that allows you
to create smarthost configuration. Did you try it?

Yes, but that didn't help the masquerading part. What I said above was that
the SmartHost wasn't enough without masquerading.

I've been thru the config thing, repeatedly and have not seen any
questions about masquerading.

I did find something in the docs but what I understood them to be saying
isn't working .. not yet anyway... still tinkering with it.

----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

reader
In reply to this post by reader
Sorry for the delay, my replys on gmane.mail.postfix.user are
not seeming to get thru so trying the mail list.

Richard wrote:
> Generally port 25 is blocked (both directions) on Comcast dynamic IP
> assignments. So, to send mail you'll likely need to configure your
> MTA (postfix or sendmail) to use port 587/starttls (with
> authentication) to send mail via your account on your mail provider's
> server (or simply have your MUA do that and not bother with an MTA).

Thanks for info on comcast.

That mail account is not the one I use... IPs change overtime but my email has
remained the same since 1996-7 or so.  I want my email address's smtp server
newsguy.com to do the relaying.  and have done so for quite a goodly while.
I'd like to get postfix to let me do that.

----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

reader
In reply to this post by reader

Wietse wrote:
> I forgot about authentication.
>
>     relayhost = [smtp.newsguy.com]:587
>
> See http://www.postfix.org/SOHO_README.html for this and other
> information of interest.

That doesn't seem to work yet at least not by itself but could also be
seriuosly inept pilot error. But before I start posting logs
and so on, I'm trying to get masquerading to help this work.  But must not
be understanding the docu well enough

This page:
  http://www.postfix.org/ADDRESS_REWRITING_README.html#masquerade
says in part:

"Address masquerading is disabled by default, and is implemented by the
cleanup(8) server. To enable, edit the masquerade_domains parameter in the
main.cf file and specify one or more domain names separated by whitespace or
commas. When Postfix tries to masquerade a domain, it processes the list from
left to right, and processing stops at the first match.

Example:

    /etc/postfix/main.cf:
        masquerade_domains = foo.example.com example.com"

I thought that might mean I could do:
masquerade_domains = u0.local.lan newsguy.com

But still get complaints from smarthost about u0.local.lan not recognized.

I think I will try
  masquerade_domains = newsguy.com
Might be more like what is expected to do.

I'm still tinkering so should know soon.

----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

reader
In reply to this post by reader
>Wietse wrote:
>> I forgot about authentication.
>>
>>     relayhost = [smtp.newsguy.com]:587
>>
>> See http://www.postfix.org/SOHO_README.html for this and other
>> information of interest.
>
>That doesn't seem to work yet at least not by itself but could also be
>seriuosly inept pilot error. But before I start posting logs
>and so on, I'm trying to get masquerading to help this work.  But must not
>be understanding the docu well enough
>
>This page:
>  http://www.postfix.org/ADDRESS_REWRITING_README.html#masquerade
>says in part:

[...]

>Example:

>    /etc/postfix/main.cf:
>        masquerade_domains = foo.example.com example.com"
>
>I thought that might mean I could do:
>masquerade_domains = u0.local.lan newsguy.com
>
>But still get complaints from smarthost about u0.local.lan not recognized.
>
>I think I will try
>  masquerade_domains = newsguy.com
>Might be more like what is expected to do.
>
>I'm still tinkering so should know soon.

That didn't do it either. The most significant log message below:

Aug 5 22:49:17 u0 postfix/smtp[18892]: CC02E182330:
to=<[hidden email]>, relay=smtp.newsguy.com[74.209.136.78]:587,
delay=5.4, delays=0.06/0.03/5.3/0.04, dsn=5.1.8, status=bounced (host
smtp.newsguy.com[74.209.136.78] said: 553 5.1.8
<[hidden email]>... Domain of sender address [hidden email]
does not exist (in reply to MAIL FROM command))

I'm not really sure what that last sentence is trying to tell me but I
had hoped the masquerading would rewrite that to be [hidden email].

Seems like what I need is to be able to make the righthand side say
`newsguy.com' in both From: and the Sender info.

But perhaps I have something else in main.cf screwed up.

Included below:
-------------------
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no

smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated
defer_unauth_destination

masquerade_domains = newsguy.com

relayhost = [smtp.newsguy.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/relay_passwords
smtp_sasl_security_options =
myhostname = u0.local.lan
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = u0.local.lan
mydestination = u0.local.lan, u0, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 51200000
recipient_delimiter =
inet_interfaces = all
inet_protocols = all
home_mailbox = mbox
------------------------

----

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

Marat Khalili
In reply to this post by reader
On 06/08/17 05:14, [hidden email] wrote:
> Marat K wrote:
>> Nothing to do with postfix.
> Well that's good news.
>
> When I used sendmail, fetchmail would pass incoming mail to port25 for
> sendmail to deliver. I don't know how postfix works but I thought it might be
> the same way when used with fetchmail.
Well, AFAIU postfix is only an SMTP server. You'll need something like
dovecot to actually hold your incoming mail and make it accessible to
your mail client. Since you already have external IMAP accounts I'm not
sure this extra local server is necessary, but if you wish try dovecot,
worked for me. Another thing that worked for me is offlineimap for
synchronizing contents of IMAP accounts directly, without intermediate
SMTP server.

> Yes, but that didn't help the masquerading part. What I said above was that
> the SmartHost wasn't enough without masquerading.
Sorry, can't say anything about masquerading: I don't use it, all my
hosts have static FQDNs. Since postfix have own notion of hostname that
can be different from system's, it is possible that you won't need
masquerading too actually.

--

With Best Regards,
Marat Khalili
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: setup for personal computer, no domain, smarthost

Wietse Venema
In reply to this post by reader
[hidden email]:

>
> Wietse wrote:
> > I forgot about authentication.
> >
> >     relayhost = [smtp.newsguy.com]:587
> >
> > See http://www.postfix.org/SOHO_README.html for this and other
> > information of interest.
>
> That doesn't seem to work yet at least not by itself but could also be
> seriuosly inept pilot error. But before I start posting logs
> and so on, I'm trying to get masquerading to help this work.  But must not
> be understanding the docu well enough

Indeed. SOHO_README.html has all the info you need to have
no real domain name and send email with your ISP account.

> This page:
>   http://www.postfix.org/ADDRESS_REWRITING_README.html#masquerade
> says in part:

Don't use that page. The masquerade feature is inferior to the
smtp_generic_maps feature described in SOHO_README.html.

        Wietse
Loading...