ispconfig mailbox to osTicket

Discussion in 'Installation/Configuration' started by rolfpf, Jan 23, 2011.

  1. rolfpf

    rolfpf New Member

    I am trying to create an email pipe from a ispconfig mailbox called "support@example.com.au" to osTicket on the same server.

    I am running on centos 5.5 with Postfix, Dovecot and a DKIM Before-Queue filter and a DKIM After-Queue filter.

    On centos 5.5 I noticed that maildrop_plugin.inc.php plugin was not enabled, so I ran the following command:

    Code:
    cd /usr/local/ispconfig/server/plugins-enabled
    [root@server1 plugins-enabled]# ln -s /usr/local/ispconfig/server/plugins-available/maildrop_plugin.inc.php ./maildrop_plugin.inc.php

    As a test of the forwarder from ispconfig3 to osTicket I entered an email redirect in the "Custom mail filter recipe" field of support@example.com.au as
    follows:

    Code:
    redirect "rpfotenh@example.com.au";
    keep;
    I should now be able to logon to a mailbox and send to support@example.com.au and have it redirected to rpfotenh@example.com.au right!

    If this works I will then be able to do the piping which is what I want to do. However when I try the redirect as above, I get it normally delivered to
    support and NO delivery to rpfotenh@example.com.au, why is this?


    The maillog file shows the following:

    Code:
    Jan 23 14:44:25 server1 dkimproxy.out[2585]: connect from 127.0.0.1
    Jan 23 14:44:25 server1 postfix/smtpd[3695]: connect from localhost.localdomain[127.0.0.1]
    Jan 23 14:44:25 server1 postfix/smtp[3691]: discarding EHLO keywords: 8BITMIME STARTTLS
    Jan 23 14:44:25 server1 postfix/smtpd[3695]: B77CF42047A: client=unknown[172.17.0.2]
    Jan 23 14:44:25 server1 dkimproxy.out[2585]: DKIM signing - signed; message-id=<fd6dafab90e73230b040d6a4086e423b@server1.example.com.au>, 
    
    signer=<sample@example.com.au>, from=<sample@example.com.au>
    Jan 23 14:44:25 server1 postfix/cleanup[3690]: B77CF42047A: message-id=<fd6dafab90e73230b040d6a4086e423b@server1.example.com.au>
    Jan 23 14:44:25 server1 postfix/qmgr[2580]: B77CF42047A: from=<sample@example.com.au>, size=1821, nrcpt=1 (queue active)
    Jan 23 14:44:25 server1 postfix/smtpd[3695]: disconnect from localhost.localdomain[127.0.0.1]
    Jan 23 14:44:25 server1 postfix/smtp[3691]: 8FCAC420479: to=<support@example.com.au>, relay=127.0.0.1[127.0.0.1]:10027, delay=1.7, 
    
    delays=0.29/0.85/0.22/0.3, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as B77CF42047A)
    Jan 23 14:44:26 server1 postfix/qmgr[2580]: 8FCAC420479: removed
    Jan 23 14:44:26 server1 dovecot: auth-worker(default): mysql: Connected to localhost (dbispconfig)
    Jan 23 14:44:26 server1 dovecot: deliver(support@example.com.au): sieve: msgid=<fd6dafab90e73230b040d6a4086e423b@server1.example.com.au>: stored mail 
    
    into mailbox 'INBOX'
    Jan 23 14:44:26 server1 postfix/pipe[3697]: B77CF42047A: to=<support@example.com.au>, relay=dovecot, delay=0.57, delays=0.18/0.07/0/0.32, dsn=2.0.0, 
    
    status=sent (delivered via dovecot service)
    Jan 23 14:44:26 server1 postfix/qmgr[2580]: B77CF42047A: removed
    Jan 23 14:44:27 server1 dovecot: imap-login: Login: user=<sample@example.com.au>, method=PLAIN, rip=172.17.0.2, lip=172.17.0.2, secured
    Jan 23 14:44:27 server1 dovecot: IMAP(sample@example.com.au): Disconnected: Logged out bytes=311/4464
    Jan 23 14:44:30 server1 dovecot: imap-login: Login: user=<sample@example.com.au>, method=PLAIN, rip=172.17.0.2, lip=172.17.0.2, secured
    Jan 23 14:44:30 server1 dovecot: IMAP(sample@example.com.au): Disconnected: Logged out bytes=350/3345
    Jan 23 14:45:01 server1 dovecot: imap-login: Login: user=<rpfotenh@example.com.au>, method=PLAIN, rip=172.17.0.2, lip=172.17.0.2, secured
    Jan 23 14:45:01 server1 dovecot: IMAP(rpfotenh@example.com.au): Disconnected: Logged out bytes=39/426
    Jan 23 14:45:03 server1 postfix/smtpd[3771]: connect from localhost.localdomain[127.0.0.1]
    Jan 23 14:45:03 server1 postfix/smtpd[3771]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    Jan 23 14:45:03 server1 postfix/smtpd[3771]: disconnect from localhost.localdomain[127.0.0.1]
    Jan 23 14:45:03 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured

    It appears that the relay is always to dovecot and NOT to the defined filter, why is this? Can I get the redirect and hence pipe to work?

    Regards
    Rolf
     
  2. till

    till Super Moderator

    The ceontos setup ues dovecot together with deliver as lda. So the maildrop plugin must be disabled. Your original setup was ok, so please remove the symlink that you added manually.

    On a setup with dovecote / deliver, you use sieve syntax for mailfilter rules and not maildrop syntax.
     
  3. rolfpf

    rolfpf New Member

    I set it back as you said. I tried the redirect (as above) and it worked fine.

    I now replaced the redirect code with the following in /var/vmail/globalsieverc

    Code:
    if header :contains ["To", "Cc", "Bcc"] "support@example.com.au" {
    pipe "/var/www/clients/client1/web4/web/support/api/pipe.php";
      stop;
    }

    When a message is sent to support@example.com.au, the log shows:

    Code:
    Jan 24 11:03:35 server1 dovecot: deliver(support@example.com.au): sieve: main_script: line 2: unknown command 'pipe' (only reported once at first occurence)
    The question now is how do I do a pipe to pipe.php without a pipe command in Dovecot sieve?
     
  4. Franz

    Franz Member

    I use osTicket with pop featch and work just fine.
     

Share This Page