Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-15 Thread Wietse Venema
Thomas Strike:
> On 5/14/20 3:08 PM, Wietse Venema wrote:
> > Wietse Venema:
> >> Thomas Strike:
> >>> Thought: I am assuming that Postfix is only reading from the main.cf and
> >>> master.cf files. Could it be possible that Postfix is trying to use
> >>> main.cf* and master.cf*?
> >> On 5/14/20 12:28 PM, Wietse Venema wrote:
> >>> Type "postfix reload" and report the main.cf filename in the logs.
> >> Thomas Strike:
> >>> Which logs are you talking about. After setting up Postfix and Dovcot,
> >>> everything reports to var/log/maillog. Postfix doesn't report it's conf
> >>> files that it loaded from there, only that it reloaded. Is there other
> > It reports the main.cf file in that line.
> >
> > May 14 16:07:50 spike postfix/master[1225]: reload -- version 3.6-20200316, 
> > configuration /etc/postfix
> 
> May 15 09:46:46 sleepyvalley postfix/master[20463]: reload -- version 
> 3.3.1, configuration /etc/postfix

Postfix uses

- /etc/postfix/main.cf with parameter settings, documented in
  postconf(5), also at http://www.postfix.org/postconf.5.html .

- /etc/postfix/master.cf with service definitions and per-service
  parameter overrides, documented in master(5), also at
  http://www.postfix.org/master.5.html .

To find all my alias_maps settings:

In main.cf:
$ postconf alias_maps
alias_maps = hash:/etc/aliases

In master.cf:
$ postconf -P '*/*/alias_maps'
postconf: warning: unmatched request: "*/*/alias_maps"

So I don't have alias_maps settings in master.cf.

Wietse


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-15 Thread Thomas Strike

On 5/14/20 3:08 PM, Wietse Venema wrote:

Wietse Venema:

Thomas Strike:

Thought: I am assuming that Postfix is only reading from the main.cf and
master.cf files. Could it be possible that Postfix is trying to use
main.cf* and master.cf*?

On 5/14/20 12:28 PM, Wietse Venema wrote:

Type "postfix reload" and report the main.cf filename in the logs.

Thomas Strike:

Which logs are you talking about. After setting up Postfix and Dovcot,
everything reports to var/log/maillog. Postfix doesn't report it's conf
files that it loaded from there, only that it reloaded. Is there other

It reports the main.cf file in that line.

May 14 16:07:50 spike postfix/master[1225]: reload -- version 3.6-20200316, 
configuration /etc/postfix


May 15 09:46:46 sleepyvalley postfix/master[20463]: reload -- version 
3.3.1, configuration /etc/postfix


This is the version that still exists in the CentOS 8 repositories.

I was looking for the c0nfig file name(s). That just shows the c0nfig 
file path.


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Wietse Venema
Wietse Venema:
> Thomas Strike:
> > Thought: I am assuming that Postfix is only reading from the main.cf and
> > master.cf files. Could it be possible that Postfix is trying to use
> > main.cf* and master.cf*?
> 
> On 5/14/20 12:28 PM, Wietse Venema wrote:
> > Type "postfix reload" and report the main.cf filename in the logs.
> 
> Thomas Strike:
> > Which logs are you talking about. After setting up Postfix and Dovcot, 
> > everything reports to var/log/maillog. Postfix doesn't report it's conf 
> > files that it loaded from there, only that it reloaded. Is there other 

It reports the main.cf file in that line.

May 14 16:07:50 spike postfix/master[1225]: reload -- version 3.6-20200316, 
configuration /etc/postfix



Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Wietse Venema
Thomas Strike:
> Thought: I am assuming that Postfix is only reading from the main.cf and
> master.cf files. Could it be possible that Postfix is trying to use
> main.cf* and master.cf*?

On 5/14/20 12:28 PM, Wietse Venema wrote:
> Type "postfix reload" and report the main.cf filename in the logs.

Thomas Strike:
> Which logs are you talking about. After setting up Postfix and Dovcot, 
> everything reports to var/log/maillog. Postfix doesn't report it's conf 
> files that it loaded from there, only that it reloaded. Is there other 
> logs hidden somewhere?

http://www.postfix.org/DEBUG_README.html#logging

Look for obvious signs of trouble Postfix logs all failed and
successful deliveries to a logfile.

  * When Postfix uses syslog logging (the default), the file is
usually called /var/log/maillog, /var/log/mail, or something
similar; the exact pathname is configured in a file called
/etc/syslog.conf, /etc/rsyslog.conf, or something similar.

  * When Postfix uses its own logging system (see MAILLOG_README),
the location of the logfile is configured with the Postfix
maillog_file parameter.

When Postfix does not receive or deliver mail, the first order of
business is to look for errors that prevent Postfix from working
properly:

% egrep '(warning|error|fatal|panic):' /some/log/file | more

Note: the most important message is near the BEGINNING of the output.
Error messages that come later are less useful.

The nature of each problem is indicated as follows:

  * "panic" indicates a problem in the software itself that only a
programmer can fix. Postfix cannot proceed until this is fixed.

  * "fatal" is the result of missing files, incorrect permissions,
incorrect configuration file settings that you can fix. Postfix
cannot proceed until this is fixed.

  * "error" reports an error condition. For safety reasons, a Postfix
process will terminate when more than 13 of these happen.

  * "warning" indicates a non-fatal error. These are problems that
you may not be able to fix (such as a broken DNS server elsewhere
on the network) but may also indicate local configuration errors
that could become a problem later.


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Thomas Strike
Which logs are you talking about. After setting up Postfix and Dovcot, 
everything reports to var/log/maillog. Postfix doesn't report it's conf 
files that it loaded from there, only that it reloaded. Is there other 
logs hidden somewhere?


On 5/14/20 12:28 PM, Wietse Venema wrote:

Thomas Strike:

Thought: I am assuming that Postfix is only reading from the main.cf and
master.cf files. Could it be possible that Postfix is trying to use
main.cf* and master.cf*?

Type "postfix reload" and report the main.cf filename in the logs.

Wietse
.


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Thomas Strike
I am a novice to Postfix and only have to deal with setting up a new 
mail server every couple of years or so. This is only my 3rd time 
setting Postfix up in the past 10 years. Over time things change and 
every time I do this I have to learn it all over again. With all the 
extensive configurations and interactions with other associated service 
add-ons such as Dovecot and PostfixAdmin, and the mysql database 
(mariadb), I think that I am doing pretty good since I am alone and 
don't have any help accept for you guys. So, when I add a comment like 
"I looked in  postconf -d ..." It is not imagination, it's just not 
knowing what this is all about and concern that I am not putting an open 
SMTP relay on line like I did the first time trying to set up a mail server.


1. egrep -r 'mysql-aliases\.cf' /etc/postfix
nothing found.
2. postconf -x | egrep 'mysql-aliases.cf'
nothing found.
3. postconf -M | egrep 'mysql-aliases.cf'
nothing found.

By the way, I do appreciate all the help I can get. Thanks, Tom

On 5/14/20 12:37 PM, Viktor Dukhovni wrote:

On Thu, May 14, 2020 at 12:06:34PM -0500, Thomas Strike wrote:


This error is still showing up in the log but it doesn't appear to be
causing any problems that I have detected.

"May 12 14:21:44 sleepyvalley postfix/smtpd[16326]: error: open
/etc/postfix/mysql-aliases.cf: No such file or directory"
"May 12 13:07:28 sleepyvalley postfix/smtps/smtpd[15107]: error: open
/etc/postfix/mysql-aliases.cf: No such file or directory"
"May 12 13:14:26 sleepyvalley postfix/submission/smtpd[15196]: error:
open /etc/postfix/mysql-aliases.cf: No such file or directory"

That was two days ago now, is it still happening today?

Post the outputs each of:

 1. egrep -r 'mysql-aliases\.cf' /etc/postfix

 2. postconf -x | egrep 'mysql-aliases.cf'

 3. postconf -M | egrep 'mysql-aliases.cf'

And any similar log messages *today*.


I looked in  postconf -d | grep 'mynetworks ' and the following came up.
Could this error be caused by any of this stuff? Does Postfix really use
all of this or is it superfluous and widening the SMTPd server for attach?

You're letting your imaging run wild.



Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Viktor Dukhovni
On Thu, May 14, 2020 at 12:06:34PM -0500, Thomas Strike wrote:

> This error is still showing up in the log but it doesn't appear to be 
> causing any problems that I have detected.
> 
> "May 12 14:21:44 sleepyvalley postfix/smtpd[16326]: error: open 
> /etc/postfix/mysql-aliases.cf: No such file or directory"
> "May 12 13:07:28 sleepyvalley postfix/smtps/smtpd[15107]: error: open 
> /etc/postfix/mysql-aliases.cf: No such file or directory"
> "May 12 13:14:26 sleepyvalley postfix/submission/smtpd[15196]: error: 
> open /etc/postfix/mysql-aliases.cf: No such file or directory"

That was two days ago now, is it still happening today?

Post the outputs each of:

1. egrep -r 'mysql-aliases\.cf' /etc/postfix

2. postconf -x | egrep 'mysql-aliases.cf'

3. postconf -M | egrep 'mysql-aliases.cf'

And any similar log messages *today*.

> I looked in  postconf -d | grep 'mynetworks ' and the following came up. 
> Could this error be caused by any of this stuff? Does Postfix really use 
> all of this or is it superfluous and widening the SMTPd server for attach?

You're letting your imaging run wild.

-- 
Viktor.


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Bill Cole

On 14 May 2020, at 13:06, Thomas Strike wrote:

I looked in  postconf -d | grep 'mynetworks ' and the following came 
up. Could this error be caused by any of this stuff? Does Postfix 
really use all of this or is it superfluous and widening the SMTPd 
server for attach?


'postconf -d' shows you Postfix's *default values* for every setting.  
If you want to see what Postfix is actually using that diverges from the 
defaults, use '-n' instead.


--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not For Hire (currently)


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Wietse Venema
Thomas Strike:
> Thought: I am assuming that Postfix is only reading from the main.cf and 
> master.cf files. Could it be possible that Postfix is trying to use 
> main.cf* and master.cf*?

Type "postfix reload" and report the main.cf filename in the logs.

Wietse


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Thomas Strike

On 5/14/20 2:18 AM, Viktor Dukhovni wrote:

Have you looked in master.cf?  Are you looking at the right main.cf
file?

Look in the output of "postconf -n" and "postconf -M".


Yes. and postconf doesn't list this path/file in any -n, -m, -M, -p, or 
-d.  I have only one main.cf and one master.cf file. Both of these 
files, I copied and renamed *.cf.orig. to make working config files.


Thought: I am assuming that Postfix is only reading from the main.cf and 
master.cf files. Could it be possible that Postfix is trying to use 
main.cf* and master.cf*?


This error is still showing up in the log but it doesn't appear to be 
causing any problems that I have detected.


"May 12 14:21:44 sleepyvalley postfix/smtpd[16326]: error: open 
/etc/postfix/mysql-aliases.cf: No such file or directory"
"May 12 13:07:28 sleepyvalley postfix/smtps/smtpd[15107]: error: open 
/etc/postfix/mysql-aliases.cf: No such file or directory"
"May 12 13:14:26 sleepyvalley postfix/submission/smtpd[15196]: error: 
open /etc/postfix/mysql-aliases.cf: No such file or directory"


I have mynetworks = 127.0.0.0/8 in my main.cf file.

I looked in  postconf -d | grep 'mynetworks ' and the following came up. 
Could this error be caused by any of this stuff? Does Postfix really use 
all of this or is it superfluous and widening the SMTPd server for attach?


mynetworks = 127.0.0.0/8 54.39.19.0/24 [::1]/128 
[2607:5300:203:2a80::]/57 [fe80::]/64
proxy_read_maps = $local_recipient_maps $mydestination 
$virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps 
$virtual_mailbox_domains $relay_recipient_maps $relay_domains 
$canonical_maps $sender_canonical_maps $recipient_canonical_maps 
$relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps 
$sender_bcc_maps $recipient_bcc_maps $smtp_generic_maps 
$lmtp_generic_maps $alias_maps $smtpd_client_restrictions 
$smtpd_helo_restrictions $smtpd_sender_restrictions 
$smtpd_relay_restrictions $smtpd_recipient_restrictions 
$address_verify_sender_dependent_default_transport_maps 
$address_verify_sender_dependent_relayhost_maps 
$address_verify_transport_maps $fallback_transport_maps 
$lmtp_discard_lhlo_keyword_address_maps $lmtp_pix_workaround_maps 
$lmtp_sasl_password_maps $lmtp_tls_policy_maps $mailbox_command_maps 
$mailbox_transport_maps $postscreen_discard_ehlo_keyword_address_maps 
$rbl_reply_maps $sender_dependent_default_transport_maps 
$sender_dependent_relayhost_maps $smtp_discard_ehlo_keyword_address_maps 
$smtp_pix_workaround_maps $smtp_sasl_password_maps $smtp_tls_policy_maps 
$smtpd_discard_ehlo_keyword_address_maps $smtpd_milter_maps 
$virtual_gid_maps $virtual_uid_maps


Tom


Did you do that?  I am quite sure that "mysql-aliases.cf" is not
hard-coded into Postfix, so if it is reported as expected, then it is
part of your configuration in some manner, either via main.cf or
via master.cf settings for the "smtps" service.



Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Viktor Dukhovni
On Thu, May 14, 2020 at 02:01:31AM -0500, Thomas Strike wrote:

> > So I would not expect virtual alias tables to be appropriate as alias
> > tables.  What problem are you actually trying to solve?
>
> I'm hosting multiple domains and I'm using virtual host tables. I am
> not sure that I have a problem since I can send SMTP mail with TLS and
> receive all the spam as fast as I can delete it. I am just a little
> concerned about that path/filename that popped up in the mail log
> since it's declaration doesn't exist in ether config file or show up
> in the postconf -n, -m, or -d lists. What evil lurks deep in the
> bowels of my server that would be attempting to use a file that isn't
> specified and doesn't exist.

Have you looked in master.cf?  Are you looking at the right main.cf
file?

> > > *May 12 07:50:57 sleepyvalley postfix/smtps/smtpd[9495]: error: open 
> > > /etc/postfix/mysql-aliases.cf: No such file or directory
> >
> > Look in the output of "postconf -n" and "postconf -M".

Did you do that?  I am quite sure that "mysql-aliases.cf" is not
hard-coded into Postfix, so if it is reported as expected, then it is
part of your configuration in some manner, either via main.cf or
via master.cf settings for the "smtps" service.

-- 
Viktor.


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-14 Thread Thomas Strike

On 5/13/20 4:29 PM, Viktor Dukhovni wrote:

On Wed, May 13, 2020 at 03:42:47PM -0500, Thomas Strike wrote:


Postfix is trying to access the aliases table in the postfix db with a
wrong file name and directory. I thought I had this fixed yesterday but
it is showing up again today.
I changed the property, alias_maps = /etc/postfix/mysql-aliases.cf
Yes, that needs a table type prefix.
to: mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
Oops, my bad again. Yes, I left out "mysql:" in my statement when I last 
posted. It is actually declared the way you suggested right now.

This fails the sniff test, the lookup keys in virtual alias tables are
fully-qualified (user@domain) and the RHS values support only lists
of addresses, while "alias_maps" has bare keys (user) and supports
a different RHS syntax with ":include:/path", "|command", ...

So I would not expect virtual alias tables to be appropriate as alias
tables.  What problem are you actually trying to solve?
I'm hosting multiple domains and I'm using virtual host tables. I am not 
sure that I have a problem since I can send SMTP mail with TLS and 
receive all the spam as fast as I can delete it. I am just a little 
concerned about that path/filename that popped up in the mail log since 
it's declaration doesn't exist in ether config file or show up in the 
postconf -n, -m, or -d lists. What evil lurks deep in the bowels of my 
server that would be attempting to use a file that isn't specified and 
doesn't exist.
*May 12 07:50:57 sleepyvalley postfix/smtps/smtpd[9495]: error: open 
/etc/postfix/mysql-aliases.cf: No such file or directory *

Look in the output of "postconf -n" and "postconf -M".



Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-13 Thread Viktor Dukhovni
On Wed, May 13, 2020 at 03:42:47PM -0500, Thomas Strike wrote:

> Postfix is trying to access the aliases table in the postfix db with a 
> wrong file name and directory. I thought I had this fixed yesterday but 
> it is showing up again today.

> I changed the property,
>
> alias_maps = /etc/postfix/mysql-aliases.cf

Yes, that needs a table type prefix.

> to:
>
>   mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,

This fails the sniff test, the lookup keys in virtual alias tables are
fully-qualified (user@domain) and the RHS values support only lists
of addresses, while "alias_maps" has bare keys (user) and supports
a different RHS syntax with ":include:/path", "|command", ...

So I would not expect virtual alias tables to be appropriate as alias
tables.  What problem are you actually trying to solve?

> May 12 07:50:57 sleepyvalley postfix/smtps/smtpd[9495]: error: open 
> /etc/postfix/mysql-aliases.cf: No such file or directory

Look in the output of "postconf -n" and "postconf -M".

-- 
VIktor.


Re: Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-13 Thread Wietse Venema
Thomas Strike:
> Postfix is trying to access the aliases table in the postfix db with a 
> wrong file name and directory. I thought I had this fixed yesterday but 
> it is showing up again today. I changed the property, alias_maps = 
> /etc/postfix/mysql-aliases.cf to 
> mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, the actual access 
> file to my aliases table. I searched the main.cf and master.cf files and 
> that file and directory is no longer there. What could be possibly 
> trying to use the wrong file?

Perhaps because something changed the file? Look at the file
last status change time. Perhaps that will provide a clue. 

ls -lc main.cf

For the sake of sanity, Postfix does not spontaneously change its
config files. There is only program, postconf, and that program
makes changes only on request.

Wietse


Postfix is trying to access the aliases table in my db with a wrong file name and directory. t.s.

2020-05-13 Thread Thomas Strike
Postfix is trying to access the aliases table in the postfix db with a 
wrong file name and directory. I thought I had this fixed yesterday but 
it is showing up again today. I changed the property, alias_maps = 
/etc/postfix/mysql-aliases.cf to 
mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, the actual access 
file to my aliases table. I searched the main.cf and master.cf files and 
that file and directory is no longer there. What could be possibly 
trying to use the wrong file?


May 12 07:50:57 sleepyvalley postfix/smtps/smtpd[9495]: error: open 
/etc/postfix/mysql-aliases.cf: No such file or directory


Tom S.