Postfix/sendmail config issues

Hello All,
I have never had need to have or setup an email server until now. Goal is to have send only capability, no receive.
This is strictly so logwatch can send me reports. I have tried a couple times to configure it based on information found googling however I continually get errors. So I have restored the original postfix main.cf to start from scratch.
Also note I get the following error:
postfix[11429]: fatal: parameter inet_interfaces: no local interface found for ::1
Although IPv6 has been disabled? Im unable to resolve this or basic config, Any help please.

Chad

On 2012-12-10 20:46, chadk5utc wrote:
>
> Hello All,
> I have never had need to have or setup an email server until now. Goal
> is to have send only capability, no receive.
> This is strictly so logwatch can send me reports. I have tried a couple
> times to configure it based on information found googling however I
> continually get errors. So I have restored the original postfix main.cf
> to start from scratch.
> Also note I get the following error:
> postfix[11429]: fatal: parameter inet_interfaces: no local interface
> found for ::1
> Although IPv6 has been disabled? Im unable to resolve this or basic
> config, Any help please.

Please ask a moderator to move this to the network-internet subforum, as
it is not related to 64 bit hardware. I will reply after it is done.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Could one of the moderators please move this to the network-internet subforum

On 2012-12-11 01:36, chadk5utc wrote:
>
> Could one of the moderators please move this to the network-internet
> subforum

Use PM, a personal message to them.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Ok
sorry this was posted in the wrong subforum, this forum is layout is very different than others I belong to and Im not finding users/moderators lists except the 1000 plus pages?

On 2012-12-11 02:56, chadk5utc wrote:
>
> Ok
> sorry this was posted in the wrong subforum, this forum is layout is
> very different than others I belong to and Im not finding
> users/moderators lists except the 1000 plus pages?

Yiks. Sorry, I access the forum via nntp so I’m not familiar with how
exactly to do it. You might try the report button at the bottom :-?


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Go to the home page. Right beneath the list of country fora is “View Site Leaders” - click on it. Go to Global Moderators section, chose one online and send them a private message to review and move the thread to the right forum.

Ok thats done and thanks for pointing me where I needed to go.

Chad

Hello,
Now that your post has been moved to the Networking forum, IMO it actually should have been moved to the Apps forum. You’ll find plenty of other Postfix solutions there.

If your Postfix configuration is default, it should automatically be configured to relay messages through Localhost port 25. You should be able to test by telnet to that port, even send a message by commandline to a mailserver that won’t reject using anti-spam rules.

I have not used Logwatch before so can’t comment on how to configure the app.

HTH,
TSU

On 2012-12-12 04:06, tsu2 wrote:
>
> Hello,
> Now that your post has been moved to the Networking forum, IMO it
> actually should have been moved to the Apps forum. You’ll find plenty of
> other Postfix solutions there.

I thought mail was a networking issue. Ok, thanks, I now know it has
been moved, I had no idea it had.

> chadk5utc;2510033 Wrote:
>> Hello All,
>> I have never had need to have or setup an email server until now. Goal
>> is to have send only capability, no receive.

Typically you set up both, there is no distinction; but you close the
firewall, thus no incoming connections.

>> This is strictly so logwatch can send me reports. I have tried a couple
>> times to configure it based on information found googling however I
>> continually get errors. So I have restored the original postfix main.cf
>> to start from scratch.

The easiest route is to force a postfix reinstall, yes, making sure that
the config is deleted:


rpm --erase --force postfix
cd /etc/postfix
rm *
cd
zypper install postfix

I do the removal with rpm because with zypper it may install the
replacement daemon, sendmail.

Then the next step is to use yast, mail module, and accept defaults.
Open a secondary terminal and on it run “tailf /var/log/mail” so that
you can follow results. Say no to retrieve email or leave it empty. Do
not attempt to use the “advanced” section, that would setup ldap and a
lot of things that you do not need. There is documentation in
doc.opensuse.org, the reference book about this module.

Accepting the defaults should be enough to be able to send email. Test
by sending email from “root” to a plain user in the same machine, and do
the test by using the command “mail” on the same terminal. It is a crude
MUA (mail user agent, ie, the user program).

if you have errors at this stage or later, I need you copy here the
error message in the logs, and inside code tags:

Posting in
Code Tags - A Guide

To send to another machine you need also to have the named service
running. Maybe not strictly necessary, not sure.

Once we have this running, we’ll consider sending email outside, if you
need it. Email will probably be rejected because you will be considered
an spammer.

>> Also note I get the following error:
>> postfix[11429]: fatal: parameter inet_interfaces: no local interface
>> found for ::1
>> Although IPv6 has been disabled? Im unable to resolve this or basic
>> config, Any help please.

We’ll go into this if it happens again.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

> chadk5utc;2510033 Wrote:
>> Hello All,
>> I have never had need to have or setup an email server until now. Goal
>> is to have send only capability, no receive.

Typically you set up both, there is no distinction; but you close the
firewall, thus no incoming connections.

I haven’t checked lately but years ago any intalled SMTP relay defaulted to relaying only from the local machine so no firewalling may be necessary.

Should be verified, of course and/or inspect the details of the config file.

TSU

On 2012-12-12 16:36, tsu2 wrote:

>>> chadk5utc;2510033 Wrote:
>>>> Hello All,
>>>> I have never had need to have or setup an email server until now.
>> Goal
>>>> is to have send only capability, no receive.
>>
>> Typically you set up both, there is no distinction; but you close the
>> firewall, thus no incoming connections.
>>
>
> I haven’t checked lately but years ago any intalled SMTP relay
> defaulted to relaying only from the local machine so no firewalling may
> be necessary.
>
> Should be verified, of course and/or inspect the details of the config
> file.

I mean that the firewall, by default, is closed for incoming SMTP
connections, thus “receive” capability will not work. The server is
capable, but behind a wall, where only localhost connections work.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Hello again
OK after spending hours more reading, googling and spoke with a colleague I have been able to get the mail server working.

postfix/local[31249]: 8C14112780B: to=<root@linux-v5kq.site>, orig_to=<root>, relay=local, delay=23, delays=23/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)

My only concern in the main.cf is this

myhostname = linux-v5kq.site

which shows up in the mail log as:

to=<root@linux-v5kq.site>

this being the server. However without an FQDN I doubt there will be anything else I can do, Im just trying to ensure that my ISP doesnt kill/block my service.
All other email addresses are legit to and from the machine and Logwatch works Great!

On 2012-12-12 21:36, chadk5utc wrote:
>
> Hello again
> OK after spending hours more reading, googling and spoke with a
> colleague I have been able to get the mail server working.

So, you did not follow the advice I gave you.

> Code:
> --------------------
> postfix/local[31249]: 8C14112780B: to=<root@linux-v5kq.site>, orig_to=<root>, relay=local, delay=23, delays=23/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
> --------------------

Ok, local email work.

> My only concern in the main.cf is this
> Code:
> --------------------
> myhostname = linux-v5kq.site
> --------------------
> which shows up in the mail log as:
> Code:
> --------------------
> to=<root@linux-v5kq.site>
> --------------------

Right.

> this being the server. However without an FQDN I doubt there will be
> anything else I can do, Im just trying to ensure that my ISP doesnt
> kill/block my service.

It will, of course. If you send email that way it will be blocked. You
can obtain and use a domain, a fixed IP, and assign it to your server.
Or you can tell postfix to send emails via relay hosts in your ISP(s),
so that it is they who really send email.

Do you want to do that, to send email to internet from, for example,
your gmail address? It can be done, I do it. If you say so I will
explain the procedure.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Hi yes I did do as suggested I went back through Yast accepting the defaults (not advanced) and yes I agree with someone elses statement that this was years ago much easier to do. In fact I used to have simple script to do this.
Moving on I do have 5 static ip’s but no domain name. I am considering this at this point. If I do get an FQDN how hard will it be to reconfigure the server to fully support this? its been over 10 years since Ive done this.

On 2012-12-12 22:56, chadk5utc wrote:
>
> Hi yes I did do as suggested I went back through Yast accepting the
> defaults (not advanced) and yes I agree with someone elses statement
> that this was years ago much easier to do. In fact I used to have simple
> script to do this.
> Moving on I do have 5 static ip’s but no domain name. I am considering
> this at this point. If I do get an FQDN how hard will it be to
> reconfigure the server to fully support this? its been over 10 years
> since Ive done this.

For that step I’m not the appropriate man, I don’t control “real” sites.
I know the theory, but I don’t feel confident enough to advise people.

In theory it is simple. You have a domain and an IP, you give that name
to the machine, and you inform postfix of that. Simple :slight_smile:

Or you add an MX register to your domain, and make it point it to the
exact machine that has postfix (postfix.mynetwork.com, for example).

The next step is testing the setup and solving problems. In the postfix
web page there are advices on how to harden up a postfix server. Filters
and such.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Here is a shortlist of base considerations for mail

I assume you already understand the diff between a mailserver which is required for inbound and holds mail vs postfix and sendmail which are only SMTP relays which route but does not store mail.

“Most” ISPs today block unauthorized SMTP so your mail client needs to connect to an authorized SMTP relay. This can be an SMTP relay provided by your ISP or an authorized relay you setup with the co-operation of your ISP.

You can also connect your mail client to a remote SMTP relay on the public Internet. This is typically how typical Internet services are provided to a customer who might be connecting from a public WiFI hotspot.

If you setup an authorized SMTP relay, it’s typically in combination with an incoming mailserver. Today, setting up your own mailserver requires your ISP to configure a reverse lookup record associated with their own DNS records that lists your mailserver. This is not something you can do yourself and is not the same thing as a reverse lookup you can configure for your own Domain records. Note if you setup your own SMTP relay without restrictions that prevent spamming you will be blacklisted.

HTH,
TSU