PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > mailing.postfix.users > How can I create a new mailbox in php?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How can I create a new mailbox in php?

Réponse
 
LinkBack Outils de la discussion
Vieux 28/02/2006, 01h32   #1 (permalink)
pyda001@ec.auckland.ac.nz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How can I create a new mailbox in php?

Hi!

I have postfix running and working as it should. I can add, remove and
administer mailboxes and aliases using postfixadmin. All well there
too.

Now, I want to be able to add mailboxes and aliases using my own
php-code. Therefore I studied the postfixadmin code (which is working),
and it looked like the only thing needed was entries in the postfix
database. Nevertheless, I must be missing something. My code adds the
appropriate entries for the mailbox and alias, yet I can't log in and
get an imap error. I also thought postfix added the appropriate
directories automatically for the new mailboxes. What am I missing?

Thanks!


- Peder -

  Réponse avec citation
Vieux 28/02/2006, 11h14   #2 (permalink)
David
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How can I create a new mailbox in php?

pyda001@ec.auckland.ac.nz wrote:
> Hi!
>
> I have postfix running and working as it should. I can add, remove and
> administer mailboxes and aliases using postfixadmin. All well there
> too.
>
> Now, I want to be able to add mailboxes and aliases using my own
> php-code. Therefore I studied the postfixadmin code (which is working),
> and it looked like the only thing needed was entries in the postfix
> database. Nevertheless, I must be missing something. My code adds the
> appropriate entries for the mailbox and alias, yet I can't log in and
> get an imap error. I also thought postfix added the appropriate
> directories automatically for the new mailboxes. What am I missing?
>
> Thanks!
>
>
> - Peder -
>

Hi Peder,

Are you issuing postmap & then postfix reload commands after you'd added
the mailbox/alias?

David.
  Réponse avec citation
Vieux 28/02/2006, 22h07   #3 (permalink)
pyda001@ec.auckland.ac.nz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How can I create a new mailbox in php?

Hi David!

Thanks for answering. No, I'm only adding the database entries. Could
you tell me the best way to do a postmap and postfix reload in php?
Should I set it up as a cron job or every time a user is added? I
reccon we'll get a few new accounts every day, not more.

Peder

  Réponse avec citation
Vieux 01/03/2006, 09h31   #4 (permalink)
David
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How can I create a new mailbox in php?

pyda001@ec.auckland.ac.nz wrote:
> Hi David!
>
> Thanks for answering. No, I'm only adding the database entries. Could
> you tell me the best way to do a postmap and postfix reload in php?
> Should I set it up as a cron job or every time a user is added? I
> reccon we'll get a few new accounts every day, not more.
>
> Peder
>

Hi Peder,

I haven't tried personally, but php's exec command is probably what you
are after (http://www.php.net/manual/en/function.exec.php) but you'll
obviously need to confirm permissions will allow it.

As to your cron job idea, only you can answer this. The idea itself is
sound, it all depends on whether you're users are happy to wait for
their account to be available (ie. wait for the cron job to have run) or
whether they want/need it immediately (in which case a exec command in
php would be the way to go).

Good luck. David.
  Réponse avec citation
Vieux 03/03/2006, 18h33   #5 (permalink)
pyda001@ec.auckland.ac.nz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How can I create a new mailbox in php?

Nope, postmap and postfix reload didn't work. Must be something else
going on here. For others who might read this thread, the only thing I
actually do is to add entries in the postfix database. I add a mailbox
and an alias. is really appreciated.


- Peder -

  Réponse avec citation
Vieux 06/03/2006, 19h52   #6 (permalink)
pyda001@ec.auckland.ac.nz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How can I create a new mailbox in php?

Looks like I finally stumbeled upon the answer to my own question:

Seems like postfix for some reason doesn't add the appropriate folders
until a first message is received. Without it only an SMTP error is
generated upon login. The solution is therefore to send a dummy/welcome
message to the new mailbox. All should work from then on.

- Peder -

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h33.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09433 seconds with 14 queries