[pfx] Re: sending email to FQDN address without DNS

2024-07-15 Thread Adam Weremczuk via Postfix-users

Thank you sir, that's exactly what I was after.

On 11/07/2024 19:49, Wietse Venema via Postfix-users wrote:


With

 main.cf:
 disable_dns_lookups = yes
 smtp_host_lookup = native

the Postfix SMTP client will usually look in /etc/hosts.

Wietse
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] sending email to FQDN address without DNS

2024-07-11 Thread Adam Weremczuk via Postfix-users

Hi all,

I have a highly isolated host (e.g. most outgoing traffic blocked, no 
DNS) but I would like to use Postfix on that host to send certain emails 
to a single address exam...@example.com.


I've already allowed 25 TCP traffic to the email server of example.com, 
which is normally sufficient.


How about telling Postfix that this server is the MX record of example.com?

With DNS working that's how Postfix normally figures it out, by 
requesting MX records and trying them by priority order, right?


Without DNS, can I hardcode it somewhere?

Regards,
Adam




___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: "delivered to command" config

2024-05-29 Thread Adam Weremczuk via Postfix-users
After adding both lines and running postmap on /etc/postfix/virtual, 
both the base address and the alias reach the destination machine (server2).

Thank you sir!


On 28/05/2024 19:27, Wietse Venema via Postfix-users wrote:

Wietse Venema via Postfix-users:

Adam Weremczuk via Postfix-users:

I've tried your suggestion.

SERVER1 is still trying to deliver test email locally rather than
forward to SERVER2:


According to your postfinger output, you did not confihgure
virtual_alias_maps on server1 to send bugzilla mail to server2.
Therefore, Postfix on server1 will deliver it locally.

There needs to be a virtual_alias_maps rule like this:

 bugzi...@matrixscience.co.uk   bugzi...@server2.matrixscience.co.uk

or like thisL

 bugzi...@matrixscience.com bugzi...@server2.matrixscience.co.uk

or maybe both.

See my previous email for how to configure and manage Postfix virtual
alias maps.

Wietse


: host
  mx0.myLANdomain.com[/var/run/cyrus/socket/lmtp] said: 550-Mailbox
  unknown.  Either there is no mailbox associated with this 550-name
or you
  do not have authorization to see it. 550 5.1.1 User unknown (in
reply to
  RCPT TO command)


The NEW virtual_alias_maps configuration takes effect ONLY for new messages.

For more support, follow https://www.postfix.org/DEBUG_README.html#mail

Wiuetse
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: "delivered to command" config

2024-05-28 Thread Adam Weremczuk via Postfix-users

I've tried your suggestion.

SERVER1 is still trying to deliver test email locally rather than 
forward to SERVER2:


: host
mx0.myLANdomain.com[/var/run/cyrus/socket/lmtp] said: 550-Mailbox
unknown.  Either there is no mailbox associated with this 550-name 
or you
do not have authorization to see it. 550 5.1.1 User unknown (in 
reply to

RCPT TO command)

Adam


On 28/05/2024 14:28, Wietse Venema via Postfix-users wrote:

Adam Weremczuk via Postfix-users:

Sorry, I'm still struggling to get anywhere with that.

Just to recap what I'm trying to achieve:

SERVER1 is a fully blown Postfix+Cyrus stack operating over the internet
and serving multiple domains.

SERVER2 is a small VM on a local LAN (same LAN as SERVER1) that runs
Bugzilla.

Both SERVERS use the same LAN domain myLANdomain.com.


You can have multiple servers with the same domain name, as long
as on each server also receives mail for its own hostname
(in your case: server1.myLANdomain.com and server2.myLANdomain.com,
respectively).

server1 :

 /etc/postfix/main.cf:
# Execute "postfix reload" after editing this file
mydestination = localhost, myLANdomain.com, server1.myLANdomain.com
 virtual_alias_maps = hash:/etc/postfix/virtual

 /etc/postfix/virtual:
# Execute "postmap hash:/etc/postfix/virtual" after editing
# this file
bugzi...@mylandomain.combugzi...@server2.mylandomain.com

server2:

 Here is the bugzilla account with ~bugzilla/.forward

 /etc/postfix/main.cf
# Execute "postfix reload" after editing this file
mydestination = localhost, myLANdomain.com, server2.myLANdomain.com


I've installed Postfix on SERVER2 and configured it as below:


Sorry, I know only Postfix settings, not thrd-prty control panels.

Wietse


setting synchronous mail queue updates: false
setting myorigin
setting destinations: server2.myLANdomain.com, server2, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 192.168.0.0/24
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: ipv4

Now, all I want to achieve is to forward all emails to
bugzi...@mypublicdomain.com to a local user (unique name) bugzilla2
created on SERVER2.

Whatever email is delivered to bugzilla2 on SERVER2 locally should be
fed to the command defined in ~bugzilla2/.forward file

So my first objective, I guess, would be to allow that local user to
receive emails from outside somehow and be treated as local emails.

I feel like I'm missing something fundamental here...

Adam


On 21/05/2024 12:00, Wietse Venema via Postfix-users wrote:

Adam Weremczuk via Postfix-users:

Thank you Victor.

What's the easiest way to change:

bugzilla@mailserver:~$ cat ~/.forward
"|/vol/localhome/bugzilla/site/live/email_in.pl -vvv 2>/tmp/bz_emailin.log"

to something like:

remoteser...@mydomain.com:/vol/localhome/bugzilla/site/live/email_in.pl
-vvv 2>/tmp/bz_emailin.log


There are multiple ways:

1 On the milserver achine:

In ~bugzilla/.forward
  bugzilla@remoteser...@mydomain.com

On the remoteserver, the ~bugzilla/.forward file with email_in.pl.

2) On the mailserver achine:

In /etc/aliases:
bugzilla: bugzilla@remoteser...@mydomain.com

run the "newaliases" command after edirting the file.

On the remoteserver, the ~bugzilla/.forward file with email_in.pl.

Wietse
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: "delivered to command" config

2024-05-28 Thread Adam Weremczuk via Postfix-users

Sorry, I'm still struggling to get anywhere with that.

Just to recap what I'm trying to achieve:

SERVER1 is a fully blown Postfix+Cyrus stack operating over the internet 
and serving multiple domains.


SERVER2 is a small VM on a local LAN (same LAN as SERVER1) that runs 
Bugzilla.


Both SERVERS use the same LAN domain myLANdomain.com.

I've installed Postfix on SERVER2 and configured it as below:

setting synchronous mail queue updates: false
setting myorigin
setting destinations: server2.myLANdomain.com, server2, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 192.168.0.0/24
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: ipv4

Now, all I want to achieve is to forward all emails to 
bugzi...@mypublicdomain.com to a local user (unique name) bugzilla2 
created on SERVER2.


Whatever email is delivered to bugzilla2 on SERVER2 locally should be 
fed to the command defined in ~bugzilla2/.forward file


So my first objective, I guess, would be to allow that local user to 
receive emails from outside somehow and be treated as local emails.


I feel like I'm missing something fundamental here...

Adam


On 21/05/2024 12:00, Wietse Venema via Postfix-users wrote:

Adam Weremczuk via Postfix-users:

Thank you Victor.

What's the easiest way to change:

bugzilla@mailserver:~$ cat ~/.forward
"|/vol/localhome/bugzilla/site/live/email_in.pl -vvv 2>/tmp/bz_emailin.log"

to something like:

remoteser...@mydomain.com:/vol/localhome/bugzilla/site/live/email_in.pl
-vvv 2>/tmp/bz_emailin.log


There are multiple ways:

1 On the milserver achine:

   In ~bugzilla/.forward
 bugzilla@remoteser...@mydomain.com

   On the remoteserver, the ~bugzilla/.forward file with email_in.pl.

2) On the mailserver achine:

   In /etc/aliases:
   bugzilla: bugzilla@remoteser...@mydomain.com

   run the "newaliases" command after edirting the file.

   On the remoteserver, the ~bugzilla/.forward file with email_in.pl.

Wietse
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: "delivered to command" config

2024-05-21 Thread Adam Weremczuk via Postfix-users
I obviously meant "remoteserver.mydomain.com", an external VM where 
Bugzilla has been migrated to.


On 21/05/2024 11:10, Adam Weremczuk via Postfix-users wrote:

Thank you Victor.

What's the easiest way to change:

bugzilla@mailserver:~$ cat ~/.forward
"|/vol/localhome/bugzilla/site/live/email_in.pl -vvv 2>/tmp/bz_emailin.log"

to something like:

remoteser...@mydomain.com:/vol/localhome/bugzilla/site/live/email_in.pl 
-vvv 2>/tmp/bz_emailin.log


?

On 21/05/2024 09:41, Viktor Dukhovni via Postfix-users wrote:

See "DELIVERY METHOD CONTROLS" 
in<https://www.postfix.org/local.8.html>, in particular

note that delivery to local users is subject to .forward file
processing.

 DELIVERY METHOD CONTROLS

    The  precedence  of  local(8)  delivery  methods  from  high 
to low is:
    aliases,  .forward  files,  mailbox_transport_maps,  
mailbox_transport,
    mailbox_command_maps,  mailbox_command, home_mailbox, 
mail_spool_direc-
    tory, fallback_transport_maps, fallback_transport, and 
luser_relay.


    alias_maps (see 'postconf -d' output)
   Optional lookup tables with aliases that apply only to  
local(8)
   recipients;  this is unlike virtual_alias_maps that 
apply to all

   recipients: local(8), virtual, and remote.

    forward_path (see 'postconf -d' output)
   The local(8) delivery agent search list for finding  a  
.forward

   file with user-specified delivery methods.
    ...

-- Viktor. ___ 
Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe 
send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: "delivered to command" config

2024-05-21 Thread Adam Weremczuk via Postfix-users

Thank you Victor.

What's the easiest way to change:

bugzilla@mailserver:~$ cat ~/.forward
"|/vol/localhome/bugzilla/site/live/email_in.pl -vvv 2>/tmp/bz_emailin.log"

to something like:

remoteser...@mydomain.com:/vol/localhome/bugzilla/site/live/email_in.pl 
-vvv 2>/tmp/bz_emailin.log


?

On 21/05/2024 09:41, Viktor Dukhovni via Postfix-users wrote:


See "DELIVERY METHOD CONTROLS" in, in 
particular
note that delivery to local users is subject to .forward file
processing.

 DELIVERY METHOD CONTROLS

The  precedence  of  local(8)  delivery  methods  from  high to low is:
aliases,  .forward  files,  mailbox_transport_maps,  mailbox_transport,
mailbox_command_maps,  mailbox_command, home_mailbox, mail_spool_direc-
tory, fallback_transport_maps, fallback_transport, and luser_relay.

alias_maps (see 'postconf -d' output)
   Optional lookup tables with aliases that apply only to  local(8)
   recipients;  this is unlike virtual_alias_maps that apply to all
   recipients: local(8), virtual, and remote.

forward_path (see 'postconf -d' output)
   The local(8) delivery agent search list for finding  a  .forward
   file with user-specified delivery methods.
...

-- Viktor. ___ Postfix-users 
mailing list -- postfix-users@postfix.org To unsubscribe send an email 
to postfix-users-le...@postfix.org

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] "delivered to command" config

2024-05-21 Thread Adam Weremczuk via Postfix-users

Hi all,

My gitolite post-receive hook 
(.gitolite/local/hooks/common/post-receive) sends an email to an 
address: bug-sub...@mydomain.com


On my Debian Postfix/Cyrus server "bug-submit" is mapped to "bugzilla" 
in /etc/aliases. Bugzilla runs locally on the same server.


When I email "bugzi...@mydomain.com" from another account I get 
"Recipient address rejected: User unknown in local recipient table".


When I email the same address from Postfix/Cyrus server's shell (echo 
test | mail -s test bugzi...@mydomain.com) I get:


"May 20 12:05:10 mailserver postfix/local[18768]: EF55B2C022E: 
to=, relay=local, delay=0.92, 
delays=0.04/0/0/0.88, dsn=2.0.0, status=sent (delivered to command: 
/vol/localhome/bugzilla/site/live/email_in.pl -vvv 2>/tmp/bz_emailin.log)"


Now, I want to modify this configuration and deliver that email to 
email_in.pl located on another host (not locally).


On Postfix/Cyrus server I've searched recursively all files in:

/etc/
/vol/cyrus
/var/mail

for any references to email_in.pl but could find absolutely nothing 
configuration related.


Any ideas how and where this "delivered to command" is configured?

Regards,
Adam

___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org