Google Mails Rejected

  • I'am set up a kolab server. Currently all works fine except, Google-ID mails beeing rejected.

    9C0E660A684264: reject: DATA from[]: 554 5.7.1 <DATA>: Data command rejected: Recipient access denied; from=<> to=<.....> proto=ESMTP helo=<>

    The rarget mail-address is ok and is able to receive mails from other public mail servers

    any suggestions what is going wrong here ...

  • After some digging i found the reason. Its relatet to googles sender address These are 91 chars. This is to long for kolab-internal caching table. (sender/Recipient defined with varchar(64).

    To fix this i changed the both column (sender, recipient) to varchar(254) and the corresponding sqlalchemy structures to string(254)

    254 seems to be the max length of a mail-address (

  • Hey,

    could you please share how you did that? what are the tablenames? i could only find

    | group_types |
    | options |
    | ou_types |
    | policy_result |
    | resource_types |
    | role_types |
    | sharedfolder_types |
    | statistic |
    | user_types |

    in the kolab database and those dont really sound like caching tables...


  • sometimes you just have to ask a question to get the AHA moment you need to figure this out... :)

    if someone else finds this topic and dont really know what to do:

    mysql -p
    mysql> use kolab;
    mysql> ALTER TABLE policy_result MODIFY COLUMN sender varchar(254);
    mysql> ALTER TABLE policy_result MODIFY COLUMN recipient varchar(254);
    mysql> ALTER TABLE statistic MODIFY COLUMN sender varchar(254);
    mysql> ALTER TABLE statistic MODIFY COLUMN recipient varchar(254);

    edit the file /usr/lib/postfix/kolab_smtp_access_policy with your favorite editor

    change within:

    policy_result_table = Table(
    'policy_result', metadata,
    Column('id', Integer, Sequence('seq_id_result'), primary_key=True),
    Column('key', String(16), nullable=False),
    Column('value', Boolean, nullable=False),
    Column('sender', String(254), nullable=True),
    Column('recipient', String(254), nullable=False),
    Column('sasl_username', String(64)),
    Column('sasl_sender', String(64)),
    Column('created', Integer, nullable=False),
    Column('data', PickleType, nullable=True),


    statistic_table = Table(
    'statistic', metadata,
    Column('id', Integer, Sequence('seq_id_statistic'), primary_key=True),
    Column('sender', String(254), nullable=False),
    Column('recipient', String(254), nullable=False),
    Column('date', Date, nullable=False),
    Column('count', Integer, nullable=False),

    save it, done...

    good luck,

Log in to reply