Postfix Configuration

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

MailMan
Posts: 30
Joined: Sun Sep 23, 2007 12:56 pm

Postfix Configuration

Postby MailMan » Mon Sep 24, 2007 5:56 pm

Hi There,

I've got Scalix working with Postfix easily but one problem i have is that we have a mail server of several hundred users using Postfix, so i need to import this data and the users into Scalix. I don't want to use LDAP i want to be able to import all of the user accounts from /etc/passwd so that i don't have to add them all manually.

We also handle mail for several hundred different domain names, is it possible to also import them and their rules into the scalix admin system via the Postfix configs?

Thanks!

Ken

chris
Scalix Star
Scalix Star
Posts: 321
Joined: Mon May 09, 2005 2:56 pm
Location: Freiburg, Germany

Postby chris » Tue Oct 02, 2007 12:39 am

Hi Ken,

Is there really enough information in /etc/passwd to create x.400 users?

MailMan wrote:I've got Scalix working with Postfix easily but one problem i have is that we have a mail server of several hundred users using Postfix, so i need to import this data and the users into Scalix. I don't want to use LDAP i want to be able to import all of the user accounts from /etc/passwd so that i don't have to add them all manually.


At a minimum, you need first name and last name for each user. Email address and authentication id can be generated automagically.

Assuming you have a flat file of the passwd format, as follows:

uid:x:uid:guid:friendly name:/home/directory:/default/shell

saved as /tmp/user.txt you can parse it as follows:

.-(~)--------------------------------------------------------------------(root@whisky)-
`--# gawk 'BEGIN { FS = "[:\\ ]" } {print $5"."$6"@company.com "$5" "$6"/IA="$5" "$6" <"$5"."$6"@company.com>"}' /tmp/user.txt|omaddu --bulk mail,node -

omaddu : Number of users added: 1

.-(~)--------------------------------------------------------------------(root@whisky)-
`--# omshowu -n name
Authentication ID: friendly.name@company.com
Globally Unique ID: 0f300000d97e5164-041.261.961.18
User Name : friendly name /CN=friendly name
MailNode : mail,node
Internet Address : friendly name <friendly.name@company.com>
System Login : 60548
Password : unset
Admin Capabilities : NO
Mailbox Admin Capabilities : NO
Language : C
Mail Account: Unlocked
Last Signon : Never.
Receipt of mail : ENABLED
Service level : 0
Excluded from Tidying : NO
Recovery Folder visible : NO
User Class : Full

If that command isn't clear, take a look at man gawk and man omaddu, and then let me know what questions you have.



MailMan wrote:We also handle mail for several hundred different domain names, is it possible to also import them and their rules into the scalix admin system via the Postfix configs?


First off, what do yo mean by rules exactly? What exact postfix config are you trying to recreate? Take a look at http://www.scalix.com/wiki/index.php?ti ... te_Postfix, which I wrote a while back, to get a starting point, then let me know what you're trying to accomplish.

Hope this helps,

Chris

MailMan
Posts: 30
Joined: Sun Sep 23, 2007 12:56 pm

Postby MailMan » Tue Oct 02, 2007 11:35 am

Hi Chris,

Thanks for your reply. I think that will work! I'll stick it on a test machine first.

In relation to the document, I can't seem to find that. Are you sure the link is correct?

And in relation to the rules, what i mean is that i have used a Postfix document on the Scalix documentation site which showed me how to move Scalix to a different port and use Postfix for our smtp processing before we go "All Guns Blazing" with Scalix.

What i mean by importing Postfix's rules is that we have transport rules and aliases setup. For example, a user might be a member of two different domains on the same mail server but have one account on the server. Rather than having to set up all of these aliases manually again in Scalix (it took 3 people 4 days to put all of them into an Excel file and associate them, that's how many there are) it would be absolutely brilliant if we could simply import them from the current virtusertables / aliases / whatever files.

I'm not sure where the Scalix Mail store is so i don't know if i can even get Postfix to leave its mail there and for Scalix to read it, but i notice there are no Scalix entries in the PostGres DB, and the accounts i setup on Scalix aren't in /var/mail.

Thanks again!

Regards,

Ken

MailMan
Posts: 30
Joined: Sun Sep 23, 2007 12:56 pm

Postby MailMan » Tue Oct 02, 2007 5:31 pm

Hi Chris,

Thanks for that. I tried that command and it worked. Unfortunately we don't have full names so i changed it a bit and it worked... One problem though is that they are all added as enterprise users and i am unsure of the correct syntax to use to add them as non-enterprise users (We only want some to have outlook the rest will be using swa).

Can you confirm if this is correct please?

Code: Select all

gawk 'BEGIN { FS = "[:\\ ]" } {print $1"@example.com "$1"/IA="$1" <"$1"@example.com>"}' /tmp/user.txt | omaddu -n --bulk --class limited mailnode


I keep getting the following error:

omaddu : [OM 8016] No mailnode was given

And i have tried many ways to get it working.

Thanks!

Ken

MailMan
Posts: 30
Joined: Sun Sep 23, 2007 12:56 pm

Postby MailMan » Tue Oct 02, 2007 5:55 pm

It's okay, i figured it out, thanks!

Code: Select all

 gawk 'BEGIN { FS = "[:\\ ]" } {print $1"@example.com "$1"/IA="$1" <"$1"@example.com>"}' /tmp/usr.txt | omaddu --bulk --class limited mailnode -


the - is very important!

chris
Scalix Star
Scalix Star
Posts: 321
Joined: Mon May 09, 2005 2:56 pm
Location: Freiburg, Germany

Postby chris » Tue Oct 02, 2007 7:02 pm

MailMan wrote:the - is very important!


it sure is! that's how omaddu knows to watch for input from stdin.

Glad that worked out for you,

Chris

MailMan
Posts: 30
Joined: Sun Sep 23, 2007 12:56 pm

Postby MailMan » Mon Oct 08, 2007 6:00 pm

Hi,

One question about this which is a problem I'm running in to. When i add users like this i cannot select them in the database.

What i've done is retrieved a list of users from an excel file. Sorted them in order and added only three columns. username, firstname, lastname. I am using this command:

Code: Select all

gawk 'BEGIN { FS = "[:\\ ]" } {print $1"@company.com "$1"/IA="$2" <"$1"@company.com>"}' /tmp/fulllist.txt|omaddu --bulk --class limited -p password mailnode -


So this gives all the users the default password of "password" and adds them to the company.com domain as a restricted user (We are using the community version of Scalix).

I see them in the list but when i click on their name i get "Could not retrieve the information for the selected user".

Is there something I'm missing here?

Regards,

Ken


Return to “Scalix Server”



Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron