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


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 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/
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@domain.local shufflel@doman.local lightbulbm@domain.local

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


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