Problems with rt-mailgate (postfix + ldap + aliases)

Hello,

I’m triying to configure rt-mailgate to forward mails with our MTA
(postfix + ldap) but I don’t know what can I do…

/etc/aliases (newaliases) do not works.
to add maildrop="|/usr/bin/rt-mailgate…" in ldap do not works.
to add alias in /etc/postfix/valiases do not works too.

File /etc/postfix/main.cf have this options related with aliases:
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_maps = ldap:valiases, ldap:vmaildrop
valiases_server_host = XX.XX.XX.XX
valiases_search_base = ou=Alias,ou=Postfix,dc=domain,dc=com
valiases_query_filter = (&(mail=%s)(objectClass=CourierMailAlias))
valiases_result_attribute = maildrop
valiases_bind = no
vmaildrop_server_host = XX.XX.XX.XX
vmaildrop_bind = no
vmaildrop_search_base = ou=users,dc=domain,dc=com
vmaildrop_query_filter = (&(mail=%
s)(!(quota=-1))(objectClass=CourierMailAlias))
vmaildrop_result_attribute = mail,maildrop

Any help is welcome.

Regards

Toni.

Toni de la Fuente wrote:

File /etc/postfix/main.cf have this options related with aliases:
alias_maps = hash:/etc/aliases

put the entries in /etc/aliases then run ‘newaliases’ (or perhaps
newaliases.postfix depending on your distribution)

.r’

Thanks Robert but it was done and without my expected results…

/etc/aliases sample
queue1: “|/usr/bin/rt-mailgate --queue ‘My Queue’ --action correspond
–url http://www.domain.com/tickets/

This is my rt-mailgate config file /etc/request-tracker3/rt.conf

server http://www.domain.com/tickets
user admin
passwd passEl 30/07/2007, a las 22:03, Robert Long escribió:

Toni de la Fuente wrote:

File /etc/postfix/main.cf have this options related with aliases:
alias_maps = hash:/etc/aliases

put the entries in /etc/aliases then run ‘newaliases’ (or perhaps
newaliases.postfix depending on your distribution)

.r’

When I try to exec this command from my mail server:

uname -a|rt-mailgate --queue ‘My queue’ --action comment --url

http://www.domain.com/tickets/

In RT server I can see (in /var/log/messages) this lines:

Jul 31 09:52:38 rainbow RT: Encode::Guess failed: ; fallback to
iso-8859-1 (/usr/lib/perl5/vendor_perl/5.8.8/RT/I18N.pm:415)
Jul 31 09:52:38 rainbow RT: Encode::Guess failed: ; fallback to
iso-8859-1 (/usr/lib/perl5/vendor_perl/5.8.8/RT/I18N.pm:415)
Jul 31 09:52:38 rainbow RT: Could not record email: Could not load a
valid user (/usr/share/rt3/html/REST/1.0/NoAuth/mail-gateway:73)

And if I try to send a mail I can see in my postfix logs this lines:

Jul 31 09:37:21 padme postfix/smtpd[14412]: 9F6FDB3402A:
client=unknown[12.12.12.12]
Jul 31 09:37:21 padme postfix/cleanup[14414]: 9F6FDB3402A:
message-id=200707310737.l6V7bOTA008042@mail.domain.com
Jul 31 09:37:21 padme postfix/qmgr[14271]: 9F6FDB3402A:
from=root@mail.domain.com, size=877, nrcpt=1 (queue active)
Jul 31 09:37:22 padme postfix/smtp[14288]: 9F6FDB3402A:
to=<|/usr/bin/rt-mailgate --queue ‘My queue’ --action correspond --url
http://www.domain.com/tickets/@domain.com>,
orig_to=soporte@domain.com, relay=localhost[127.0.0.1], delay=1,
status=bounced (host localhost[127.0.0.1] said: 550 5.1.0
<|/usr/bin/rt-mailgate --queue ‘My queue’ --action correspond --url
http://www.domain.com/tickets/@domain.com>: Recipient address rejected:
User unknown in virtual mailbox table (in reply to end of DATA command))
Jul 31 09:37:22 padme postfix/qmgr[14271]: 9F6FDB3402A: removed

Note http://www.domain.com/tickets/@domain.com ← postfix or aliases
add @domain.comEl lun, 30-07-2007 a las 13:03 -0700, Robert Long escribió:

Toni de la Fuente wrote:

File /etc/postfix/main.cf have this options related with aliases:
alias_maps = hash:/etc/aliases

put the entries in /etc/aliases then run ‘newaliases’ (or perhaps
newaliases.postfix depending on your distribution)

.r’

Toni de la Fuente Diaz

Responsable de Sistemas y Soporte
Intecna Soluciones
Fundación I+D del Software Libre

Parque Tecnológico de Ciencias de la Salud
BIC Granada-CEEI
Avda. de la Innovación, 1
18100 Armilla (Granada)
Tlf. 902003626
afuente@intecna.es
www.intecna.es

Toni de la Fuente wrote:

When I try to exec this command from my mail server:

Note http://www.domain.com/tickets/@domain.com ← postfix or aliases
add @domain.com

I see that, do you still have virtual aliases setup for those users?
What happens when you try to send something to another alias listed in
/etc/aliases? Maybe create one yourself…

testuser: afuente@intecna.es

then run newaliases and ‘echo “hello world” | mail -s testing testuser’
on that system…

It does work. But it doesn’t work with:

testuser: “|/usr/bin/rt-mailgate --queue ‘My queue’ --action correspond --url http://www.domain.com/tickets/

I can see this error in /var/log/mail.log

Jul 31 20:51:26 padme postfix/pickup[27965]: 43280B3400B: uid=0
from=
Jul 31 20:51:26 padme postfix/cleanup[29135]: 43280B3400B:
message-id=20070731185126.43280B3400B@mail.domain.com
Jul 31 20:51:26 padme postfix/qmgr[14271]: 43280B3400B:
from=root@domain.com, size=316, nrcpt=1 (queue active)
Jul 31 20:51:27 padme amavis[28959]: (28959-06) Not-Delivered,
root@intecna.es → <|/usr/bin/rt-mailgate --queue ‘My queue’ --action
correspond --url http://www.domain.com/tickets/@domain.com>, Message-ID:
20070731185126.43280B3400B@mail.domain.com, Hits: -3.66
Jul 31 20:51:27 padme postfix/smtp[29137]: 43280B3400B:
to=<|/usr/bin/rt-mailgate --queue ‘My queue’ --action correspond --url
http://www.domain.com/tickets/@domain.com>, orig_to=,
relay=localhost[127.0.0.1], delay=1, status=bounced (host
localhost[127.0.0.1] said: 550 5.1.0 <|/usr/bin/rt-mailgate --queue ‘My
queue’ --action correspond --url
http://www.domain.com/tickets/@domain.com>: Recipient address rejected:
User unknown in virtual mailbox table (in reply to end of DATA command))
Jul 31 20:51:27 padme postfix/qmgr[14271]: 43280B3400B: removed

Additionally i I try to exec this command from my mail server:

echo “Hello world” | /usr/bin/rt-mailgate --queue ‘My queue’ --action

correspond --url http://www.domain.com/tickets/

I see next errors in my RT server (/var/log/messages)

Jul 31 20:50:39 rainbow RT: Encode::Guess failed: ; fallback to
iso-8859-1 (/usr/lib/perl5/vendor_perl/5.8.8/RT/I18N.pm:415)
Jul 31 20:50:39 rainbow RT: Encode::Guess failed: ; fallback to
iso-8859-1 (/usr/lib/perl5/vendor_perl/5.8.8/RT/I18N.pm:415)
Jul 31 20:50:39 rainbow RT: Could not record email: Could not load a
valid user (/usr/share/rt3/html/REST/1.0/NoAuth/mail-gateway:73)

My RT server is Fedora Core 6 with rt3-3.6.3 (yum installed) and SELinux
disabled.

Thanks for your help.El mar, 31-07-2007 a las 11:09 -0700, Robert Long escribió:

Toni de la Fuente wrote:

When I try to exec this command from my mail server:

Note http://www.domain.com/tickets/@domain.com ← postfix or aliases
add @domain.com

I see that, do you still have virtual aliases setup for those users?
What happens when you try to send something to another alias listed in
/etc/aliases? Maybe create one yourself…

testuser: afuente@intecna.es

then run newaliases and ‘echo “hello world” | mail -s testing testuser’
on that system…

Toni de la Fuente Diaz

Responsable de Sistemas y Soporte
Intecna Soluciones
Fundación I+D del Software Libre

Parque Tecnológico de Ciencias de la Salud
BIC Granada-CEEI
Avda. de la Innovación, 1
18100 Armilla (Granada)
Tlf. 902003626
afuente@intecna.es
www.intecna.es

Jul 31 20:50:39 rainbow RT: Could not record email: Could not load a
valid user (/usr/share/rt3/html/REST/1.0/NoAuth/mail-gateway:73)

Have you given Everyone the right CreateTickets?
Or given the user sending mail the right to create Tickets?

-kevin