Hallo Zusammen,
ich möchte mit Grommunio mehrer Konten von unterschiedlichen Freemailern abrufen und am besten über ein Konto verwalten. Den Abruf über fetchmail habe ich hinbekommen.
Beim Versenden von Mails stoße ich jetzt auf das Problem, dass ich nur einen Relay-Host in der main.cfg konfigurieren kann. Gibt es eine Möglichkeit wie man abhängig von der Andresse (z.B. Senden als oder so) hier unterschiedliche Relay-Hosts nutzen kann?

Vielen Dank schon mal vorab für die Hilfe

Hi Fireball,
das geht schon, schau mal bei postifx
man postconf.5
sender_dependent_relayhost_maps (default: empty)
A sender-dependent override for the global relayhost parameter setting. The tables are searched by the envelope sender address and @domain. A
lookup result of DUNNO terminates the search without overriding the global relayhost parameter setting (Postfix 2.6 and later). This information is overruled with relay_transport, sender_dependent_default_transport_maps, default_transport and with the transport(5) table.
Specify zero or more "type:name" lookup tables, separated by whitespace or comma. Tables will be searched in the specified order until a match is found.
For safety reasons, this feature does not allow $number substitutions in regular expression maps.
This feature is available in Postfix 2.3 and later.

5 days later

Hi Sergo,
thanks for your help.
I tried to do as you told me but I got stuck in annother problem.

I modiefeid the main.cfg with the following:
sender_dependent_relayhost_maps = hash:/etc/postfix/relay_by_sender

This brings me to the follwoing error:
warning: unsupported dictionary type: hash. Is the postfix-hash package installed?
error: unsupported dictionary type: hash
warning: hash:/etc/postfix/relay_by_sender is unavailable. unsupported dictionary type: hash
warning: hash:/etc/postfix/relay_by_sender lookup error for ""<>""
warning: sender_dependent_relayhost_maps lookup failure

Thanks for your help

did you postmap the file?

postmap /etc/postfix/relay_by_sender
so that you get both files:

[root@gromox ~]# ll /etc/postfix/relay_by_sender*
-rw-r--r-- 1 root root   193  9. Jul 2024  /etc/postfix/relay_by_sender
-rw-r--r-- 1 root root 12288  9. Jul 2024  /etc/postfix/relay_by_sender.db
  • Andy replied to this.

    segro /etc/postfix/relay_by_sender

    Und was steht da drin?

    es sollte sowas drin stehen wie:

    @domain1.com  smtp.strato.de:587
    @domain2.de smtp.ionos.de:587

    Dann müssen die Zugangsdaten auch in der sasl_passwd hinterlegt werden, oder wo kommen die dann hin?

    Jap,

    [relay1.host1.tld] relaysender@host1.tld:insertcoinhere
    [relay1.host2.tld] relaysender@host2.tld:insertcoinhere

    Oder halt

    user@host1.tld user@host1.tld:insertcoinhere
    # usw...

    Hi @Fireball

    please try
    sender_dependent_relayhost_maps = lmdb:/etc/postfix/relay_by_sender
    and postmap the file again to get a relay_by_sender.lmdb

    let me know if this changed anything.

    © 2020-2024 grommunio GmbH. All rights reserved. | https://grommunio.com | Data Protection | Legal notice