• Re: [gentoo-user] Postfix config problem

    From Eray Aslan@21:1/5 to Peter Humphrey on Fri Jul 18 09:00:01 2025
    On Fri, Jul 18, 2025 at 07:23:38AM +0100, Peter Humphrey wrote:
    I've been wrestling with postfix for years, and I still can't get it to act as
    the final destination of all incoming mail. Mail from the Internet is fine, but
    mail originating on the LAN is always forwarded to the user's own machine.

    Difficult to tell without logs, bit mydestination determines what is
    delivered locally. Adding $mydomain to mydestination might help:

    https://www.postfix.org/postconf.5.html#mydestination

    (Dovecot then serves IMAP on request to KMail on my desktop machine.)

    Here is the relevant content of my latest main.cf:

    $ cat main.cf
    mynetworks_style = host
    relay_domains =
    home_mailbox = .maildir/

    Can anyone suggest something else I can try?

    And read
    https://www.postfix.org/BASIC_CONFIGURATION_README.html https://www.postfix.org/STANDARD_CONFIGURATION_README.html

    --
    Eray

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Fri Jul 18 08:30:01 2025
    Greetings,

    I've been wrestling with postfix for years, and I still can't get it to act as the final destination of all incoming mail. Mail from the Internet is fine, but mail originating on the LAN is always forwarded to the user's own machine.

    (Dovecot then serves IMAP on request to KMail on my desktop machine.)

    Here is the relevant content of my latest main.cf:

    $ cat main.cf
    mynetworks_style = host
    relay_domains =
    home_mailbox = .maildir/

    Can anyone suggest something else I can try?

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Fri Jul 18 12:40:01 2025
    On Friday, 18 July 2025 07:49:13 British Summer Time Arve Barsnes wrote:

    8

    The mail thing is very confusing, but here is some main.cf settings on
    my machine that receives mail from the other machines on the LAN:

    inet_interfaces = $myhostname, localhost
    mydestination = $myhostname, localhost.$mydomain, localhost, <my local hostname> <- the simple name, not the hostname.lan that I've set in 'myhostname'
    mynetworks = 192.168.0.0/24, 127.0.0.0/8

    Hope that helps,
    Arve

    Not quite, Arve; sorry. Quoting the simple name causes postfix to add ".localdomin" to it.

    I'll read the FM as Eray said, which I'd forgotten about.

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Fri Jul 18 17:00:01 2025
    This is a multi-part message in MIME format.

    On Friday, 18 July 2025 12:35:44 British Summer Time Javier Martinez wrote:
    El 18/7/25 a las 12:34, Peter Humphrey escribió:

    On Friday, 18 July 2025 07:49:13 British Summer Time Arve Barsnes wrote:

    8


    The mail thing is very confusing, but here is some main.cf settings on
    my machine that receives mail from the other machines on the LAN:



    inet_interfaces = $myhostname, localhost
    mydestination = $myhostname, localhost.$mydomain, localhost, <my local
    hostname> <- the simple name, not the hostname.lan that I've set in
    'myhostname'
    mynetworks = 192.168.0.0/24, 127.0.0.0/8



    Hope that helps,
    Arve


    Not quite, Arve; sorry. Quoting the simple name causes postfix to add ".localdomin" to it.

    I'll read the FM as Eray said, which I'd forgotten about.



    It seems that you disabled smtp postfix service and you are using
    dovecot as the smtp client with postfix smtpd as destination. So your dovecot gives user mails to your postfix and you expect that him relay out.

    If postfix has not smtp service it can't rely mail out since it has,
    with TURN smtp command, change from smtpd server to smtp client to
    connect to externals smtpd server IMHO. I think this is the reason
    because you outgoing mail gets inbound mail, because postfix can't act
    as smtp client and only server one.

    However without dovecot config info and master.cf file I can't confirm
    that.

    I've attached my master.cf. The only settings I've made in dovecot.conf are:

    protocols = imap
    listen = *

    --
    Regards,
    Peter.

    smtp inet n - n - - smtpd
    pickup unix n - n 60 1 pickup
    cleanup unix n - n - 0 cleanup
    qmgr unix n - n 300 1 qmgr
    tlsmgr unix - - n 1000? 1 tlsmgr
    rewrite unix - - n - - trivial-rewrite
    bounce unix - - n - 0 bounce
    defer unix - - n - 0 bounce
    trace unix - - n - 0 bounce
    verify unix - - n - 1 verify
    flush unix n - n 1000? 0 flush
    proxymap unix - - n - - proxymap
    proxywrite unix - - n - 1 proxymap
    smtp unix - - n - - smtp
    relay unix - - n - - smtp
    -o syslog_name=${multi_in
  • From Peter Humphrey@21:1/5 to All on Wed Jul 23 12:50:01 2025
    On Friday, 18 July 2025 22:13:09 British Summer Time Javier Martinez wrote:
    Can you test using the submission service?

    Remind me of the command to do that?

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Wed Jul 23 16:40:02 2025
    On Wednesday, 23 July 2025 11:57:56 British Summer Time Javier Martinez wrote:
    El 23/7/25 a las 12:41, Peter Humphrey escribió:

    On Friday, 18 July 2025 22:13:09 British Summer Time Javier Martinez
    wrote:

    Can you test using the submission service?


    Remind me of the command to do that?



    "nano /etc/postfix/master.cf"

    That was no help, so I tried:

    mail –s "Test Email" prh@localhost
    Cc:
    Subject: Test
    Test
    ^D

    I got "Cannot parse address `–s': Malformed email address"

    ...so I tried with my address here: [email protected] and got the same error. I even specified /usr/bin/mail -s ... and got the same again.

    Perhaps Dale is right, and it's just not worth the trouble to run a LAN mail system.

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)