Is possible to set external mail alias?

WOW and you come ower to my post :slight_smile: and make some reliable tuorial for NS !

Iā€™m not sure what you mean, can you enlight me? thank you

You used virtual maps to send local but it is better to write only host that should goes locally , other will goes to their Domain MX record as well. Thans @zamboni you are Hi-Level Skills on NS!

1 Like

I didnā€™t read the howto, but based on the fragment youā€™re creating, the right event is:

signal-event nethserver-mail-server-update
1 Like

thank you giacomo

is there any explanation on how 20pseudonyms works? I mean documentation, Iā€™d prefer instead of reading codeā€¦

my idea is to add a db key to every pseudonimnā€¦ default value is empty, optional value is a FQDN of another server

pseudonymn fragment should read values and if that key is not empty, use itā€¦
ATM no UI is necessaryā€¦ an howto to do something like

db accounts setprop mypseudonymn ExternalServer other.server.domain.tld
signal-event nethserver-mail-server-update

should be enough

do you think my solution will work?
Iā€™d like to discuss it

TIA

I think thereā€™s no doc about it.

That method returns the account name (if I remember correctly, in the past it was names, for groups) associated to an email address.

Mail forwards and group expansion is implemented by /etc/postfix/aliases.

so mine solution is wrongā€¦ :smiley:

seriously, in my aliases I see:

#
# 40accounts -- ensure local delivery for our accounts
#
slfusr1          slfusr1
slfusr2          slfusr2
slfusr3          slfusr3
zamboni          zamboni

I repeat, I donā€™t know postfixā€¦ should/could I work here?

On the right column you can write an external mail address (forward) or other account names (group expansion), separated by comma.

The ā€œsame name of the left columnā€ form overrides the lookup on /etc/aliases file.

@davidep, did you read this one (the answer, in the 3ad)

Iā€™m quite busy, now :frowning:

Iā€™ll surely read it, Iā€™m very interested on this kind of configuration! Please, be patient :pray:

It could be done like a next mx record, but for this @mdv say do u need to login with external account for sending mail , or where external account mail should handleā€¦ so if you dont want to login like external use mail aliases as well

the solution I posted does not work

@mdv: donā€™t hack your server, Iā€™m doing some tests/research

if/when Iā€™ll find a working solution, Iā€™ll post here

please donā€™t hold your breath :slight_smile:

ok, now I read it!

I think it should be possible to do the same from the Server Manager. The example from virtualmin.com could be implemented with Users > Edit > Services > Forward messages > Email address. It changes the /etc/postfix/aliases right column, so no need for templates-custom.

However - let me say - itā€™s a mess! POP, forwards, multiple relay domains, MX recordsā€¦ I would not like to manage similar environments! :chart_with_downwards_trend:

As @alefattorini said above, we lack multi-office support. To have it, we need to modify a lot of stuff. Assuming a single PDC domain on different offices the list could be:

  • getent()-based Users/Groups module
  • multi-branch LDAP DIT layout
  • mail server tables from LDAP
  • ā€¦

Iā€™d like to work on it, but also NethServer 7 is on the roadmapā€¦

:smiley: But I donā€™t want think about it now: Iā€™m going on vacation, next week :octopus:

@mdv post real technical specification that You need , maybe even graphically with login from inside and outside , try to help you

OP already told us what he need in a enough clear example (re-read his last post)ā€¦
something called (as @davidep says above) multi-office or, using another terminology, an hub-spokes setup

I agree with davide that OPā€™s solution is a messā€¦ with the correct hub-spokes setup, no need for external (ISP) email mailbox and pop3 collector

I did some test yesterday, two ns machines, same domain, different hostnames, all mail and dns stack installed and I come to your conclusion, we can use the forward filed/feature

I saw mail from userc (on server 2) going to usera (on server 1) but all I get is a denied message.

forward address is in the usera@server1.domain.tld form and server1.domain.tld is defined in dns hosts section

I lack some info about postfixā€¦ is there anyone interested in digging in?

Yep forward it is not that you need

okā€¦ would you mind to elaborate a bit and give some kind of examples and a POC (Proof Of Concept)?

thank you

so in /etc/postfix/main.cf
add virtual_alias_maps = hash:/etc/postfix/mail_alias
smtpd_sender_login_maps = hash:/etc/postfix/mail_alias

in /etc/postfix/mail_alias as is posted
greyb@purpoleapple.com greyb@domain.local

shufflel@purpoleapple.com shufflel@doman.local

lightbulbm@purpoleapple.com lightbulbm@domain.local

tannerj@purpoleapple.com mail.office2.purpoleapple.com

screwups@purpoleapple.com mail.office2.purpoleapple.com

funt@purpoleapple.com mail.office2.purpoleapple.com

then run postmap /etc/postfix/mail_alias
and run service postfix restart
and in other server do the same except addresses

2 Likes

Ok, sounds interesting
Now, a little task for you:
Re think it in terms of custom fragments :wink: