HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   virtusertable not getting updated (http://www.howtoforge.com/forums/showthread.php?t=4426)

22hn 20th May 2006 14:45

virtusertable not getting updated
 
Hi!

I'm quite new to both Linux, Postfix and ISPConfig and have a couple of questions for you...

If I add a site in ispconfig and then add an email user to that site, shouldn't the virtusertable and local-host-names files be updated then?

The only way I can get something to happen, is by manually running the command '/root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php' (found in another thread).

Then my virtusertable file gets updated with these 3 lines:
www.domain1.com VIRTUALDOMAIN
mike@www.domain1.com web8_mike
web8_mike@www.domain1.com web8_mike

But still no change in local-host-names...

Why is the www-part included in the email address? When editing the email user in ispconfig, it's not...

Another thing... The autogenerated 'web8_'-prefix, can that be changed?

till 20th May 2006 16:52

Quote:

If I add a site in ispconfig and then add an email user to that site, shouldn't the virtusertable and local-host-names files be updated then?

The only way I can get something to happen, is by manually running the command '/root/ispconfig/php/php -q /root/ispconfig/scripts/writeconf.php' (found in another thread).
Maybe the server daemon thread has died. Please restart ISPConfig:

/etc/init.d/ispconfig_server restart

Quote:

Then my virtusertable file gets updated with these 3 lines:
www.domain1.com VIRTUALDOMAIN
mike@www.domain1.com web8_mike
web8_mike@www.domain1.com web8_mike

But still no change in local-host-names...

Why is the www-part included in the email address? When editing the email user in ispconfig, it's not...
local-host-names changes only if you add an new website or co-domain.
In you case the co-domain domain1.com (with empty host field) is missing in the website www.domain1.com.

Quote:

Originally Posted by 22hn
Another thing... The autogenerated 'web8_'-prefix, can that be changed?

http://www.howtoforge.com/faq/14_47_en.html

trueshanti 22nd May 2006 13:26

i didnt like the www-part either .. makes nasty aliases in roundcubemail with auto-created users

so i fixed some libs
Code:

root#:>/root/ispconfig.bak/scripts/lib/classes# diff ispconfig_postfix.lib.php ispconfig_postfix.lib.php.orig
203c203
<            if(!empty($web["web_host"]) and trim($web["web_host"]) != www and trim($web["web_web_domain"]) != "somesubdomain"){
---
>            if(!empty($web["web_host"])){
303,308c303,307
<
<          if(trim($web["web_host"]) != "" and trim($web["web_host"]) != www ){
<                $virtualdomain = $web["web_host"].".".$web["web_domain"];
<                } else {
<                $virtualdomain = $web["web_domain"];
<              }
---
>          if(trim($web["web_host"]) != ""){
>            $virtualdomain = $web["web_host"].".".$web["web_domain"];
>          } else {
>            $virtualdomain = $web["web_domain"];
>          }
339c338
<              if(trim($codomain["domain_host"]) != "" and trim($codomain["domain_host"]) != www){
---
>              if(trim($codomain["domain_host"]) != ""){
419c418
< ?>
---
> ?>
\ No newline at end of file

i also make some template-changes vor named and procmail but non for postfix

-c-

22hn 22nd May 2006 21:51

Using trueshanti's code change I got rid of the annoing extra codomain to get the alias file correct. Thanks trueshanti!

But I still have to run the writeconf script to change any file contents ... And the deamon is running...

I also got rid of the username prefix...!


I added a test account and was able to login to the web mail. I successfully sent an outgoing email that arrived at it's destination. So far so good!

I then sent an email to this test user from the internet. The email is accepted by postfix and the sending smtp server receives an OK!

But it newer reaches the users inbox...!

and the mail log is constanly repeating:
postfix/master[12474]: warning: /usr/lib/postfix/local: bad command startup -- throttling
postfix/local[12727]: fatal: open database /etc/postfix/virtusertable.db: Operation not permitted
postfix/master[12474]: warning: process /usr/lib/postfix/local pid 12727 exit status 1
postfix/master[12474]: warning: /usr/lib/postfix/local: bad command startup -- throttling

This "operation not permitted" is seen in both /var/log/mail and /var/log/mail.err.

I also get the same response when doing a 'postmap /var/postfix/virtusertable'

Any ideas on this 'operation not permitted' error?

falko 22nd May 2006 23:00

Quote:

Originally Posted by 22hn
postfix/local[12727]: fatal: open database /etc/postfix/virtusertable.db: Operation not permitted

Which distribution do you use? Fedora or SuSE? If you use Fedora, then disable SELinux, if you are on SuSE, disable AppArmor.

22hn 23rd May 2006 00:37

Aaarrrghhhh... So obvious, but yet so hard to crack...!


Thanks a lot falko!


All times are GMT +2. The time now is 22:57.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.